You need to sign in to do that
Don't have an account?
Sai Ravulapati
can time based workflow field update can trigger after update method?
Hi,
I have a time-based workflow on the account which is updating a checkbox field to true when this action is executed I want my custom code to fire (after update) and make some updates on the object. Currently, the scheduled time-based action is changing to the future time when it comes to schedule execution time.
Thanks
I have a time-based workflow on the account which is updating a checkbox field to true when this action is executed I want my custom code to fire (after update) and make some updates on the object. Currently, the scheduled time-based action is changing to the future time when it comes to schedule execution time.
Thanks
from your custom code are you making any changes to same check box or any other field which is included in the workflow entery critria ??
also did that reevalvute check box on your workflow is checked ??
are you updating the date field from you custom code on which you workflow depend ?
Id AccRecTypeId = Schema.SObjectType.Account.getRecordTypeInfosByName().get('MY RecordType').getRecordTypeId();
for(Account acc:trigger.new){
if(acc.Checkbox1__2 == TRUE && acc.recordTypeId == AccRecTypeId){
if(acc.status != 'Now' && acc.status != 'Failed' && acc.status != 'Failed/Lost'
&& acc.book1__c == FALSE && acc.book2__c == FALSE && acc.book3__c == FALSE
&& acc.Owner.LastName.contains('automation')){
acc.count= 0;
acc.dollors= 0;
accountListToUpdate.add(acc);
}
system.debug('===updatedAccIds==='+updatedAccIds);
}
}
if(!accountListToUpdate.isEmpty()){
update accountListToUpdate;
}