You need to sign in to do that
Don't have an account?
Trigger when new portal user is created
I'm trying to catch the event of a new Customer Portal user being created.
I created a trigger on the User object:
trigger UserAfterInsert on User (after insert) { for (User u : Trigger.New) { System.debug('\n**** New User: contact ID: '+u.ContactId+'; IsPortalEnabled: '+u.IsPortalEnabled); } }
The output is:
**** New User: contact ID: 003S0000006mT5jIAE; IsPortalEnabled: false
isPortalEnabled is FALSE... If I query the database for this user after the trigger, isPortalEnabled is TRUE...
I imagine I could just look at the Profile Type, but I want to understand why this isn't working...