0

According to this: https://help.salesforce.com/articleView?id=fs_appointment_guidelines.htm&type=5

To limit objects that could be parents for Service appointment I should create validation rule that check first 3 characters. Example for work orders: LEFT(ParentRecordId, 3) = '0WO' But: first of all I cant even choose ParentRecord(Id) from the list of fields when creating validation rule. Secondly after typing it manually i recieve syntax error.

Is there any other way to limit parent records (maybe also in user interface -> so user wont have an option to choose for example Account)? Is there possibility to fix above issue?

1 Answer 1

0

This is actually an error in the documentation that will be corrected. The ParentRecordId field isn't available in validation rules. However a couple alternative options exist to do the same kind of validation you want:

  • Perform the validation in an Apex trigger
  • Create a new custom text field of length 18 and copy the ParentRecordId value to the field in a Before trigger. Then use that custom field in a normal validation rule.
1
  • Well I already did the validation in a trigger long time ago, but lets say that "mistake in documentation" is an answer :) Commented Dec 6, 2017 at 13:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .