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
Shubham Joge 9Shubham Joge 9 

Trigger for order object where only two future order are aloowed in draft order

Hi Guys ,
Over ther trigger object i want to write trigger on before insert to check that 1 account have only two future order in the oder draft status.no more that 2 future order should allowed .
ANUTEJANUTEJ (Salesforce Developers) 
Hi Shubham,

As stated on other questions you have posted regarding the same issue you can have a formula field that you can fetch in the trigger and check your condition.

I would also suggest you to post only one question as it would help in keeping the community clean.

Regards,
Anutej