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
megan.burchmegan.burch 

Validation Rule on lookup field

Hi, 

 

I have a trigger that populates a field on a custom object with a field on the account, but the field on that account is sometimes null. 

 

I put a validation rule on the custom object lookup field for when the field is null, throw an error message saying the field must be filled in. 

 

If I fill in field and save I still get the message even though the filed is filled in. 


Any suggestion for fixing this? 

 

Thanks!

SarfarajSarfaraj

What is the error condition formula you are using? This one should work:

 

 

ISBLANK(Custom_Field__c)

Also you may consider making the field required. This is the most obvious way to achieve the thing you are trying to do.

LakshmanLakshman

Could you post your trigger code ?

 

Regards,

Lakshman

Satish_SFDCSatish_SFDC
I guess this has something to do with the order of execution in salesforce. Anyhow, Please post the code, so we can have a look at it.

Regards,
Satish Kumar
sandeep@Salesforcesandeep@Salesforce

We need some more explanation over the question.

for now you should check whether you are updating custom object before filing account's field. Please check