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

Creating a Trigger on a User

I am trying to create a trigger that notifies an internal group when a Partner Portal user has been created.


The trigger works fine, but the test fails.


When I create a partner portal user, the resulting record has a usertype of "PowerPartner". This is the field I use in the trigger to determine if the user being created is a portal user. 


But when I create the portal user in the unit test, the usertype is "PowerCustomerSuccess"


My work-around is to check for both usertype values, but this is wrong.


Can anyone explain this behavior.