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
dev1010dev1010 

need help creating validations

Can somebody help with the formulas for creating the below in custom objects:

 

1. Let's say there are 5 fields - I need to program the following validations:

One of the two fields - Field1 or Field2 should have a value. If Field1 has a value then Field3 should have a value and if Field2 has a value then one of the fields - Field4 or Field5 should have a value.

 

2. There is a Header object and Lines object. There is a common field in both objects. If this field is populated in the Header object then that value should get carried over to all the lines with that header. (I should be able to edit the value on any line later).

 

Steve :-/Steve :-/

In scenario 1 are all of the fields mutually exclusive?  Also, what are the Field names and Datatypes of each field, as well as any picklist values?

dev1010dev1010

Yes the fields are mutually exclusive

 

Field 1 - Currency, Field 2 - %, Field 3 - Number,

 

Field 4 - Product Name, Field 5 - Product Family (Field 4 & 5 are picklists from the Products Object ) (for now, let's just say Product Family is another object as I cannot make the Product Family a picklist from the Products object).

morellomorello

1) I am afraid that we need better examples.  For now, I could suggest to rework fields 2 and 3 to formulars working with the value in field 1.

morellomorello

2) Again, an example would help... Do you really need to edit the field on the item and update the same field in the header?

My example: Field "Production Site" (= same value for the order and all its items). The field on the item is the formula copying the value from the header.

 

Hope, this helps.