function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Create view on contact layout that shows SelfServiceUser IsActive Value

I want a check box if the IsActive Value is true than have a check and if it is false have it be not checked as a field on the contact layout page.  I basically want an easy way to see from the contact level of who is or is not a self service user. 

Can anyone give me assistance in what direction to go to deliver this functionality?




Unfortunately I don't think there's any easy way to do this.


The only thing I can think of is:


1.  Add a custom checkbox field on Contact called IsSelfServiceUser (or whatever).

2.  Add an Apex trigger on before update of Contact which checks against the SelfServiceUser table to see if a contact with this ID is in it.  If it is then check that box on the contact.


This will work for all contacts you touch after this trigger is in place, but it won't check the box retroactively (unless you somehow go through and systematically "touch" every contact in the db, which you could potentially do).


Thanks.  Any hints on the Apex trigger code would be appreciated.  I will read the doc and see where i get.



I have this identical need.  Does anyone have a code snippet for the trigger?  (I can tweak simple Apex code but have difficulty creating it from scratch)