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
Abhijeet Purohit01Abhijeet Purohit01 

Problem in Validation Rule

Am getting an error msg when I try keying in the correct values in a record w.r.t a validation rule. The error msg is:

 

system.security.NoAccessException: Entity Object cannot be initialized with null EntityInfo

phiberoptikphiberoptik

This is not a validation rule error (unless you created a validation rule with this error message).

 

What do you mean by "w.r.t"?

What object is this record of that you receive the error and what exactly are you trying to change?

Abhijeet Purohit01Abhijeet Purohit01

There is a custom object called Sales_Order__c and a

there is a Validation Rule in this object with the name: BOMApproved

and the rule criteria is

AND
(
text(Quote_Line_Item__r.Product2.Family)<>"Scrap",
text(Sales_Order_Status__c)<> "Order Acknowledgement",
datevalue(BOQ__r.CreatedDate)>date(2012, 06,07),
text(BOQ__r.BOM_Status__c)<>"Approved"
)

 

Now when ever I edit an existing record, by keeping in mind not to make the above rule to be TRUE, and save the record by entering proper data am getting this error msg. Its not a Validation Error Msg. It is the message thrown by the salesforce.com. What is the meaning of that msg? I don't know what mistake am I doing.

This error msg pops up whenever a user other than ADMIN saves the record. If ADMIN saves the record then there is no error.

I have given all the access rights, related to the object, to the user.

 

 

phiberoptikphiberoptik

Check the permissions on the custom object. Do the profiles of the other users have access to the custom object BOQ?

Abhijeet Purohit01Abhijeet Purohit01

Yes. I have check marked all the check boxes for the BOQ object for the user profile.

The fields used in this validation rule have Read access only and no Edit access for the users.

 

Abhijeet

 

phiberoptikphiberoptik

Any they have access to the Sales Order object as well I assume?

Abhijeet Purohit01Abhijeet Purohit01

Yes they have access to the Sales_Order object.

phiberoptikphiberoptik

Do you have some custom object called "Entity:?

 

Do you have an Apex class functioning on this custom object? The error message is specifically related to an Apex class.