Skip to main content
  • End date (should be greater than start date)
  • Status (Pending, Ongoing, Paused, Completed) (Default status should be set based on the start and end date)
6 respuestas
  1. 26 jul 2022, 12:32

    Hi Dheeraj,

     

    see the below example, create a trigger on your object

    trigger updateorder on YourObjectAPIName__c (before insert, before update )

    {

    for(YourObjectAPIName__c rec:Trigger.new)

    {

    if(rec.End_Date__c > rec.Start_Date__c)

    {

    rec.Status__c = 'Pending';

    }

    }

    }

0/9000