Managing 'memberOf' Relationships Based on Organization Name

Hi @stephane.orluc ,

Thank you so much for your response… through that we can able to assign users to organization through bulk load. But we got the scenario where we need to assign users to multiple organization while bulk load.
I tried to use this code but it’s not doing it somewhere I am getting error. Can you provide me a workaround if possible.

Thank you in advance

1 Like

Hi @stephane.orluc ,

Thank you for your previous response using that I could able to achieve the requirement… I have got one requirement that lets say if I create a relationship based on organization name if update is required I need to remove previous relationship i.e., remove the previously configured “memberOf” data and create new relation.

Need ur assistant! Thank u in response…

hi @Suriya
To do that, instead of patching the object with "operation":"add" I think I would use "operation":"replace". Or I’ll do it with 2 steps : 1/ "operation":"remove", 2/ "operation":"add".
Regards,
Steph

1 Like

Hi @stephane.orluc ,

Thank you for your inputs. I have tried this but since it is object operation BTW I don’t know that may be the reason it’s not removing or replacing it.
For me this scenario is used in two different places

  1. One parent-child organization relationship, where I need to remove previous relation and create new one.
  2. users-organization relationship, where I need to remove the previous relationships (because user’s maybe the member of different organization).
    In simple terms, removing previous one is required, adding we can utilize existing set of codes.

Looking for you suggestion! Thanks in advance