We've a requirement where we need to set the description of AD accounts in the format "AB012345", so the process is to retrieve the latest value, increment it and set it. I've set a custom account attribute to collect this attribute during account collection, and I've written a query which will fetch and increment the value in the workflow.
This works, but the issue after successfully creating an account in AD with say "AB000010", this account is not collected and hence not available in DB after the request is completed. So if another request is made before the next scheduled collection it will create the next account with "AB000010" instead of "AB000011".
Is there a way to run an account collector after a provisioning node is completed in workflow to fix this issue?
The other workaround would be to create a custom table and use that to get the updated value, but I'm not sure if that's advisable keeping upgrading in mind.