You need to sign in to do that
Don't have an account?
Mel Lisau
Can i modify the body of triggers and classes in Production instance ?
I have a SandBox instance and have registered my triggers and classes and the test classes have passed the 75% requirement.
I also have a Production instance and these are now successfully on my Production instance. No problem there.
But in my application I have a connection to my Production instance and if i need to update a trigger in production i delete it (because i dont know what the user has changed) and then try to register , but because it is Production it wont allow me because it needs to pass tests.
My question is , once the triggers and test classes are registered with Production , can i modify the body of the triggers if required and body of the test classes if required without having to rerun on Sndbox first and then redeploy to Production ?
I also have a Production instance and these are now successfully on my Production instance. No problem there.
But in my application I have a connection to my Production instance and if i need to update a trigger in production i delete it (because i dont know what the user has changed) and then try to register , but because it is Production it wont allow me because it needs to pass tests.
My question is , once the triggers and test classes are registered with Production , can i modify the body of the triggers if required and body of the test classes if required without having to rerun on Sndbox first and then redeploy to Production ?
You will not be able to modify the code in production org directly.
Related: https://help.salesforce.com/articleView?id=000324396&type=1&mode=1
(This is not allowed by salesforce and there is an idea as well to have it implemented-https://trailblazer.salesforce.com/ideaView?id=08730000000HwAA)
Any changes to be made in production need to come through sandboxes.
However, if there are minor changes like changing Hard-coded text literals, you can go with custom labels
See https://trailblazers.salesforce.com/answers?id=9063A000000q12AQAQ for more details.
https://salesforce.stackexchange.com/questions/18013/how-to-edit-apex-code-after-deployment
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you