Update person record after AD account deleted

Hello All,

We have one use case where we wanted to do some kind of special reprovisioning. in which, if status is spl. repro. then existing AD account should get deleted and new user account should get added. up to some extend we defined the logic and looks good. but the only thing is, after the AD user account is deleted we need to update person record i.e. customproperties05 to proceed further in the workflow. I have tried Execute SQL with result in process method but that's not working, i mean to say the customproperties05 is updating for all person record who is having AD account linked.

unable to upload the image of the process here(can suggest some other way)

Can anyone please help.

Regards,

Prasad

  • Maybe a better approach is to use a process step: Handle object component - Update. You can add a where clause condition to compare that the UID_Person from the process step (I assume the process starts on table ADSAccount) is equal to UID_Person in the Person table.

  • So here is the process which i configured.

  • I never had a great experience with OUT parameters, so whenever there is a parameter that is used throgh a process i turn to Pre-script for generating on the first process step (in your case it would be the process step KKP_ADS_ADSAccount_Delete).

    In pre-Script for generating i would declare a variable:

    values("uidPerson") = Session.Source().GetSingleProperty(Of String)(Table.ADSAccount, Table.ADSAccount.UID_Person, StringFormat("UID_ADSAccount = '{0}'", $UID_ADSAccount$))

    With implementing this I would remove the process step: Get Person Record, since I have the person value stored in the pre-script variable values("uidPerson").

    In the last process step Clear AD Username - KKPS I would use the
    Process component: Handle object component - Update.
    ObjectType: Value = Table.Person
    Where clause: Value = String.Format("UID_Person = '{0}'", values("uidPerson"))

    P.S.: This is only a sketch from the top of my head, I did not actually test this in any environment.
    You might have to convert values("uidPerson") to a string, becouse I think it is considered an object - again, not 100% sure.

  • To make a small addition to Tadej's answer here... Please be (really) carefull when using Execute SQL to update fields / columns. When you update fields through SQL you 'circumvent' the object layer, that means you do not trigger events (starting processes), nor adjoining templates.

    As such the (by Tadej :) ) proposed 'Handle Object Component - Update' is the greatly preferred approach.

  • I want to ask a quesiton about it. Please reply me soon. Till then I will visit https://liahelp.com/ here because I want to hire an essay writer and I found that website link with the help of google search through which I can easily hire professional essay writer.