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
Yogesh SheteYogesh Shete 

Why Managed packaged validation rule fails when package license gets expired?

We have a validation rule on account object inside our managed package which checks the validity of custom field value from the same managed package.
After installing this managed package, the above validation rule works fine until the package license gets expired. If the package license is expired then it shows the error,
Field [FieldId] is inaccessible
on account detail page on updating/deleting account record.

Ideally, a validation rule inside managed package should not execute if package license is expired (Like apex trigger don't run if package expires).
Any idea about this error or behavior?
NagendraNagendra (Salesforce Developers) 
Hi Yogesh,

You're going to have to delete any Validation Rules which reference those components. When I ran into this issue in the past, deactivation wasn't enough. The error persisted until I removed the offending rule entirely from the system.

Thanks,
Nagendra
Yogesh SheteYogesh Shete
Thanks, Nagendra.

We can't delete validation rules from managed packages on the production. I need these validation rules to be active when the package license is active.