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
syamkishore1.3906536981992773E12syamkishore1.3906536981992773E12 

Trigger is working in sandbox but not working in production.what could be the problem?

Ramu_SFDCRamu_SFDC
please post the trigger code so that we can determine if there is any specific line/(s) that correspond only to sandbox.
syamkishore1.3906536981992773E12syamkishore1.3906536981992773E12
Hi,

Thank You for your reply.....

Actually it was my interview question.i haven't been provided code.

so,could let me know most possible causes,if possible.


NehalNehal (Salesforce Developers) 
Hi,

If trigger is working in one org and not in another, then there can be few possible reasons as below which you can check at yourend.                                                                               

1. If there is an apex class associated to the trigger and that apex class had incorrect value set in production as compared to sandbox.
2. Can be a possibility that additional trigger is present in production which is rolling back the changes for any one particular record.
3.Check if the trigger has been deployed properly from sandbox to production.                                                                                               
4. Check the status of the trigger, if it is active or inactive.                

Also you can go through below link that covers few more things:

https://developer.salesforce.com/forums/ForumsMain?id=906F000000092VpIAI.                                                                                          

Hope this answers your question.