0
Answered

Generating unique field values in Link pre-provisioning tasks

Adrian Corston 3 years ago in UNIFYBroker/Plus updated by Beau Harrison (Senior Product Software Engineer) 3 years ago 4

In a Link pre-provisioning task I would like to generate a unique value for an adapter field.  I tried using $components.CheckFieldUniqueness to check $targetEntities, but that variable only contains adapter entities that are being provisioned, and not all the others that already exist in the adapter.

I also looked at $joinedEntities, but it similarly only includes the entities being provisioned.

Can you suggest some way that I can perform a unique value check for a field across all adapter entities?

In the MH solution I used a call-out to AD directly (via the ActiveDirectory PowerShell module) rather than using $components.CheckFieldUniqueness() so I didn't see this behaviour.

Unfortunately in this solution the field value clashes will be very common because the customer wants the first UPN that gets tried to be derived solely from the person's first name.

GOOD, I'M SATISFIED
Satisfaction mark by Adrian Corston 3 years ago

This issue is thwarting my attempt to check my workaround for https://voice.unifysolutions.net/en/communities/6/topics/4186-case-insensitive-version-of-componentscheckfielduniqueness as well, so this is a reminder to myself to go back to that one.

Under review

Hi Adrian

As per the CheckFieldUniqueness documentation, the ContextNonUniques collection on the result object is populated with entities which fail the uniqueness check due to a conflict in the target context. Or is this no what you need?

Hi Beau, you're right.  I have an error in my code!  Sorry about that.