+ Start a Discussion
Bassem KhalifaBassem Khalifa 

Managing NPSP Triggers (npe5__Affiliation__c)

Can I edit a Non-profit starter pack trigger? The trigger npe5__Affiliation__c from the NPSP is causing an error for certian users. Since the functionality of this trigger is not neccessary for those users getting the error, I was wonderin if I can disable it for them? Can anyone help me do that? 
Mudasir WaniMudasir Wani

Bassem--

You can not disable it for particular user.
But you can check the user Id and stop to run  the code for the users.
If the users are associated to a profile then you can check the profileid that is better.

You can store the profile or user Id in label,
Or you can fetch them using SOQL and filters you have.


To fetch User Id you can use below code.

//Fetch User Id
UserInfo.getUserId()

//Fetch Profile Id
UserInfo.getProfileId()