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
Rajesh SriramuluRajesh Sriramulu 

Help me :How to set a 'Is Valid' to class and trigger

Can any one help me that how will we set    'Is Valid'  to class and trigger

 what will happen if it is unchecked 

 

 

 

Thanks in  Advance

Best Answer chosen by Admin (Salesforce Developers) 
velocityvelocity

According to the Documentation :

 

Triggers are stored with an isValid flag that is set to true as long as dependent metadata has not changed since the trigger was last compiled. If any changes are made to object names or fields that are used in the trigger, including superficial changes such as edits to an object or field description, the isValid flag is set to false until the Apex compiler reprocesses the code. Recompiling occurs when the trigger is next executed, or when a user re-saves the trigger in metadata.

 

 

Thanks,

Himanshu

 

All Answers

sfdcfoxsfdcfox

It is set by the system after successful compilation/testing, and reset when a unit it depends on is modified. Nothing happens if not checked, but any item marked invalid may cause errors when run.

Saravanan @CreationSaravanan @Creation

Hi,

 

go through this site, and try to understand the red contant in that site

 

http://forcemonkey.blogspot.in/2010/01/what-causes-invalid-apex-classes.html#!http://forcemonkey.blogspot.com/2010/01/what-causes-invalid-apex-classes.html

 

if this post solves ur problem make it as answered so that others make use it.

 

thanks,

saravanan

velocityvelocity

According to the Documentation :

 

Triggers are stored with an isValid flag that is set to true as long as dependent metadata has not changed since the trigger was last compiled. If any changes are made to object names or fields that are used in the trigger, including superficial changes such as edits to an object or field description, the isValid flag is set to false until the Apex compiler reprocesses the code. Recompiling occurs when the trigger is next executed, or when a user re-saves the trigger in metadata.

 

 

Thanks,

Himanshu

 

This was selected as the best answer