Hi, Please find below script to change field value to never.
User us =[Select Id,No_Workflow__c From User where id= :UserInfo.getUserId()]; system.debug('===> '+us); us.UserPreferencesReceiveNoNotificationsAsApprover = true us.UserPreferencesReceiveNotificationsAsDelegatedApprover = false update us;
Are you trying to update all users record to have Receive Approval Request Emails checked ?
I think the answer to this is, No. This is not a field in User object..
All Answers
Are you trying to update all users record to have Receive Approval Request Emails checked ?
I think the answer to this is, No. This is not a field in User object..
I just curious why it is not a field in user object, hope salesforce.com will enable it in the future, thanks.
Please find below script to change field value to never.
User us =[Select Id,No_Workflow__c From User where id= :UserInfo.getUserId()];
system.debug('===> '+us);
us.UserPreferencesReceiveNoNotificationsAsApprover = true
us.UserPreferencesReceiveNotificationsAsDelegatedApprover = false
update us;