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
JayNicJayNic 

Are validation rules protected in a managed package?

Hi,

 

I'm having trouble coming to terms with the fact that according to the documentation: customers can disable data validation rules in a managed package.

 

http://na15.salesforce.com/help/doc/en/packaging_component_attributes.htm

 

If I'm reading this right, the validation rule can literally be turned off. This effectively "invalidates" data by permitting users to skirt rules they find annoying... As a developer of an app, I need to ensure it functions correctly with the right source data - how can I do this if the very method of validating my data is avoidable?

 

Honestly, I just can't believe this could happen, and I'm hoping I'm mis-interpreting it...

 

So, if this is the case, how am I supposed to validate my applications data?

Satish_SFDCSatish_SFDC
Yes you are right.
If you want to avoid this then probably validating the data in triggers or classes is a better option. This way subscribers wont be able to deactivate or change the code.

Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
JayNicJayNic

Holy crap... That's absolutely insane... Another business decision made by the retarded monkey they hired at Salesforce, and occasionally let out in to Product Management...

 

Who said to themselves: "Let's make a system to easily write customized data validation for applications built on our platform, and then let's throw it's usefullness out the window by letting clients manipulate the applications API!"

 

Brilliant move

netspidernetspider
Hi Jay
Im sorry to say that I agree with Salesforce here. I'll explain, say your VR built on Account actually affects a customers day to day operations because the way your app is built in the VR, but the customer likes your app and wants to use it, if you cant turn the VR off they have no choice but not to use your app. If they are able to turn it off, then at least they can manage data integrity issues themselves and take on that responsibility 
Steve
Ramón MuñozRamón Muñoz
They should give package developers the choice of protected or unprotected Validation Rules but not allow protected ones on standard objects. This would mitigate your concern @netspider but address the real problem.