You need to sign in to do that
Don't have an account?

flag to identify Customer Portal users
Hi I've written a trigger to send emails off the case object in certain scenarios, but I only want this trigger to fire when the user making updates is an internal user and not a customer portal user. Currently I have an If statement that says when profileid <> the customer portal ids. This is not very maintable, is there a flag that I can use to identify if a user is a customer portal user?
Thanks.
All Answers
I created a string to capture the profile name for the current user and then i check my string for the words customer portal.
String pName = ''; for( User u : [SELECT Id,Profile.Name FROM User WHERE Id = :userInfo.getUserId()] ) {pName += u.Profile.Name;} pName.contains('customer portal') ==true;