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

Validation rule for mandatory fields

Hi all,


I am required to create  a validation rule that will triggers the obligation to fill in certain fields.


So the case scenario is:


If field policy (lookup) is blank, then fields "policy number", "start date", "end date" are to be mandatory.


I have been trying to implement the following logic for the object case ( as these fields are part of it):


AND (ISBLANK (,NOT (ISBLANK (policy.number)), NOT (ISBLANK...."


But it is not accepted in the syntax.


Would please someone help me on this :)?


Thank you!




Just use the below mentioned  formula after replacing your exact field name.


ISBLANK(policy-lookup)   &&  ( ISBLANK( policy number)   ||  ISBLANK(  start date  )  || ISBLANK(end date ))





Hi Manis,


Thanks a lot :)


Would it be possible to implement this requirement through a Validation rule and not a trigger?


Thanks for confirming.






The above mentioned formula is for validation rule. No need to write an trigger for this.

Oh great thanks very much :) -- *Elisabet Guti?rrez Magallanes* | Consultant aborda ? a Cloud Computing Company | WTC Moll de Barcelona s/n Edificio Sur 2a planta, 08039 Barcelona (Spain) Office: +34 902 500 093 Ext 2032 | Mobile: +34 663.364.609 | ** [image: Logo]Follow us: [image: facebook] [image: twitter] [image: linkedIn] [image: eco] No me imprimas si no es necesario. Protejamos el medio ambiente