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 get error message on based of record type?

Hii All,
A User edits a account record and changes the Status to Inactive,A account record exists:
If the Account record has any related Contact Status records where Record Type = Contact 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 Account.
NagendraNagendra (Salesforce Developers) 
Hi Himanshu,

You can write validation rule for that.
 
Please refer below thread which has similar discussion.

https://success.salesforce.com/answers?id=90630000000h0D0AAI

Please mark this post as best answer if it helps.

Best Regards,
Nagendra.P