• truebruce
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I have a contact which has a partner user. I am disabling the partner user from contact detail page by selecting "Disable partner user" option from "Work with Portal Button" dropdown.

 

I have a trigger on User object which fires on after update event.

 

trigger TR_User on User (after update) {
system.debug('########'+trigger.new[0].IsActive + '-' + trigger.old[0].IsActive);
}

 

In this trigger I am checking the IsActive field value of user object. But both Trigger.New[0].IsActive and Trigger.Old[0].IsActive returns same value i.e true. While I was expecting it to become false as User is disassociated from the contact in this process.

 

I am not sure whether it is a bug in the Salesforce or I am missing something...

 

Please Suggest.

 

Thanks,

Devendra Natani

Blog