Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorial:adm:virtual_system_-_adding_or_deleting_managed_extended_attributes [2019/06/05 13:47] doischert [Deleting attributes on virtual systems] |
tutorial:adm:virtual_system_-_adding_or_deleting_managed_extended_attributes [2020/01/24 10:28] apeterova removing an attribute which already has some values |
||
---|---|---|---|
Line 35: | Line 35: | ||
{{ : | {{ : | ||
+ | |||
+ | <note important> | ||
===== Step 4: check the functionality ===== | ===== Step 4: check the functionality ===== | ||
Line 55: | Line 57: | ||
If you want to stop provisioning an attribute which is present in other systems you have to do even fewer changes. This can be relevant in the above mentioned phone number case. In this case, undo only steps 2 and 3. | If you want to stop provisioning an attribute which is present in other systems you have to do even fewer changes. This can be relevant in the above mentioned phone number case. In this case, undo only steps 2 and 3. | ||
+ | |||
+ | <note tip> | ||
+ | If you want to remove an attribute from a virtual system which was already used, so it has existing virtual accounts with this attribute filled, you have to remove the values of the accounts' | ||
+ | </ | ||
First, remove the mapping of the attribute. Click Virtual systems, List, Mapping, and Provisioning. Check the checkbox next to the attribute you want to remove. Above the list, a new dialog should appear, Operation with selected record. Click and choose Remove. Click Yes. | First, remove the mapping of the attribute. Click Virtual systems, List, Mapping, and Provisioning. Check the checkbox next to the attribute you want to remove. Above the list, a new dialog should appear, Operation with selected record. Click and choose Remove. Click Yes. | ||
Line 67: | Line 73: | ||
{{ : | {{ : | ||
+ | |||
+ | Next, delete the attribute from the Form definitions of VsAccount. Click Form definitions in Settings, find the VsAccount item, check under Name that this is the virtual system from which you are removing the attribute. Open the item using the magnifying glass. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Go to Form Attributes, check the box next to the attribute you want to remove and click on Operation with selected record, choose Remove and click Yes. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | If this operation fails with the message that there are already some values, you must go to the IdM database and delete those values by SQL. It's strongly recommended to make a backup of the database prior to this action. | ||
+ | |||
+ | <code sql> | ||
+ | -- Check the values you are about to delete - change the code of your attribute and your system name -- | ||
+ | SELECT * FROM vs_account_form_value WHERE attribute_id IN (SELECT id FROM idm_form_attribute WHERE code=' | ||
+ | |||
+ | -- Delete the values | ||
+ | DELETE FROM vs_account_form_value WHERE attribute_id IN (SELECT id FROM idm_form_attribute WHERE code=' | ||
+ | </ | ||
+ | |||
+ | Then you can remove the attribute from the Form Attributes as written above. | ||
The attribute is still present in the detail of the user; however, it is no longer connected to the virtual system and the implementer will not be notified when the attribute' | The attribute is still present in the detail of the user; however, it is no longer connected to the virtual system and the implementer will not be notified when the attribute' |