You need to sign in to do that
Don't have an account?
pabrams
how to list profiles to disable/enable triggers for profiles like in a custom configuration page
how to list profiles to disable/enable triggers for profiles like in a custom configuration page
All Answers
I hope that the below link is useful to you.
https://help.salesforce.com/articleView?id=users_profiles_apex_access.htm&type=5 (https://help.salesforce.com/articleView?id=users_profiles_apex_access.htm&type=5).
Thank You,
www.nubeselite.com (http:// www.nubeselite.com)
Development | Training | Consulting
Please mark this as solution if your problem is solved.
You can create a custom field with two fields - ProfileName (type Text) and isDisabled type checkbox).
Then create records with Profile name and isDisabled an use these custom setting in trigger like:
custom_sett__c csObj = new custom_sett__c.getValues('System administrator);
right now i'm having disableTrigger created under API custom setting.
and using this on lead trigger :
boolean disableTrigger=APIConfig__c.getOrgDefaults().mkto_si__Enable_Trigger__c;
if (!disableTrigger){
System.debug('Executing Trigger');
}
how do i create records for profile names?.
im looking for listing this profiles in custom setting to choose profiles where and all they need to disable.
i dont want to hardcode StandardUser it should be from the value user selects
I am presuming mkto_si__Enable_Trigger__c is your custom settings.
You can got ot Setup --> custom settings --> custom settings --> Manage records --> New --> Add values per your profile requirements.