function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Developer.mikie.Apex.StudentDeveloper.mikie.Apex.Student 

Help with workflow trigger

Hey there,

I have a workflow rule which is designed to create a new task and assign it another user, then change the old task to 'failed to action'.

This workflow rule is emant to trigger when this occurs:

and( (Subject = 'Call Prospective Client'), ( Expiry_Test__c = now()), (ISPICKVAL(Status, 'Not Started')) )

It is howeer not working, is it possible to trigger a workflow in this way? Would it be better to do this via a trigger?

Thank you
Best Answer chosen by Developer.mikie.Apex.Student
BakTBakT
Use a time trigger workflow instead and set it to trigger when it reaches Expiry_Test__c 

All Answers

@anilbathula@@anilbathula@
Hi ,

Just remove this ( Expiry_Test__c = now()), from your workflow rule and please check the the workflow .
It will work now.

Thanks
Anil.B
Developer.mikie.Apex.StudentDeveloper.mikie.Apex.Student
Hey anilbathula,

Thank you for the reply....but the whole idea of the workflow rule is to trigger when a task has not been actioned after an alloted time. If I remove that, then the trigger will be useless.

Are you saying I cannot accomplish this with a workflow? Would a trigger perhaps work better? If so, would you by any chance be able to share some exaple code on the format?

Thank you for your time.
BakTBakT
Use a time trigger workflow instead and set it to trigger when it reaches Expiry_Test__c 
This was selected as the best answer