Skip to main content
Pavan Agrawal 님이 * Experience Cloud *에 질문했습니다

Hello Team,

 

I have added a checkbox on contact object to create a partner user. If it is checked then create a contact as a Partner user which works fine. However, I am unable to inactive user using APEX call using flow.

 

List<User> lstUser = [select Id from user where contactId IN: ContactIdList];         for(User uobject: lstUser){     if(uobject.Id != null){                  uobject.IsActive = false;                  //uobject.ContactId = '';              }         }         update lstUser;

I am able to set user account as Inactive but I want to remove contact association also with that users like disable partner user button works. How to do that? Is there any method to Inactive partner users in Salesforce? Thanks!

답변 3개
  1. 2024년 10월 3일 오후 12:18

    The isPortalEnabled is a derived field. it can sometimes cause issues if there is other processing to be done after the portal user is disabled. Still checking what should be the right way of doing this. :(

0/9000