Skip to content

Removing a reference value

I needed to delete all the Managers from people in the FIM Portal where a particular Manager was set. I had blithely assumed this would be easy with the FIM PowerShell plugin – sadly, not so.

You can clear a string value easily enough by setting it to an empty string. So this works:

$ImportObject = ModifyImportObject -TargetIdentifier $ID -ObjectType 'Person'
SetSingleValue -ImportObject $ImportObject -AttributeName 'MiddleName' -NewAttributeValue ''
import-fimconfig -ImportObject $ImportObject

However change that string attribute to a single-valued reference attribute like Manager and you get this helpful error:

Import-FIMConfig : Failure when making web service call.

SourceObjectID = guid
Error = The web service client has encountered the following class of error: Other
Details: Additional Text Details: Request could not be dispatched.

Note that I’m only having this problem because my reference attribute is single-valued – for multi you can actually delete any specific value, including the last one, essentially nulling the field. But for single-valued you can’t use the Delete operation – you have to use Replace, and it won’t let you replace it with a null or empty string.

Eventually I figured out that I could actually delete the value using a workflow with just the OOB Function Evaluator activity. Set the reference attribute to a space (not an empty string for some reason – I had to put a space as the string), run the workflow against the set of people with the Manager I needed to remove, and I got the job done.

Update: It turns out that setting to a space also works for nulling a Boolean attribute.

{ 2 } Comments

  1. Ross | May 8, 2013 at 3:52 pm | Permalink

    Hey Carol, do you know of a fast way to clear a multivalue reference field?

    So far, I have to read the field, then do a remove on all objects in the field… There has to be a better way! (FIM catch-cry)

    - Ross

  2. Carol | May 8, 2013 at 9:13 pm | Permalink

    That’s the only way I’ve found too.

Post a Comment

Your email is never published nor shared. Required fields are marked *

Spam comments will be blocked by Akismet

*

Endep online order order buy Endep online purchase Endep online without script buy generic Endep from india buy in Endep uk where to buy Endep without a prescription Endep from canada buy 10 mg Aricept generic Aricept cost order Nizoral no visa Nizoral 200 mg buy cheap Nizoral line Nizoral on line best finpecia online pill Requip Requip free Requip uk Amitriptyline generic buy generic Amitriptyline from india where buy Lisinopril purchasing finpecia with overnight delivery Nizoral online buy saturday delivery buy Nizoral in mo finpecia online how to buy Cytotec online without a rx order Aricept pharmacy buy Aricept with no prescription buy Amitriptyline no perscription cod Online us Requip how to buy Amitriptyline without a prescription buy line Amitriptyline buy Amitriptyline money buy purchase Accutane 40 mg on line no rx Accutane 40 mg sale order 40 mg Accutane online next day delivery 40 mg Accutane online buy Lisinopril pay cod Lisinopril overnight cod buy lisinopril without prescription buy lisinopril purchase Premarin cod next day delivery where buy Premarin buy Premarin online free fedex delivery Premarin cheapest place to buy Metformin purchase Metformin online generic 20mg prednisone online finpecia online overnight buy finpecia cheap buy Metformin toronto Metformin prescription buy Metformin where metformin purchased online without prescription buy metformin online cod purchase metformin money purchase order Metformin usa buy metformin cash on delivery buy online rx finpecia without fedex finpecia overnight without a prescription buy Metformin discount can i order finpecia onlinebuy finpecia cheap prednisone prescription cost Metformin canadian pharmacy buy cheap generic Metformin online lisinopril buy lisinopril