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
Himanshu Verma 9Himanshu Verma 9 

how to show errror message

Hii All,
If the account record has any related contact records where Record Type = Worker Shift and Status = Pending or Scheduled, then the system displays an error saying "You cannot deactivate a account that has pending or scheduled shift."  System displays the view screen for the related contact.
Onesh ReddyOnesh Reddy
Hi Himanshu,

A Trigger on Account would serve your perpose.(Error message can be displayed through Trigger based the Criteria mentioned)

Best Regards,