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
Patrick HanahanPatrick Hanahan 

Error when adding contacts: Sync.ContactTrigger

Hi,

Does anyone know how to fix this issue when adding a contact?

See below for error message:
sync.contactTrigger: execution of AfterInsert caused by: line 8, column 9: trigger body is invalid and failed recompilation: Dependent class is invalid and needs recompilation
Gaurav NirwalGaurav Nirwal
1. Minimize the number of references to other fields
2. Minimize the number of times formula functions are called
3. Rethink your picklist
4. Think about the problem another way
5. If all else fails, use a workflow field update (or trigger)
Shashikant SharmaShashikant Sharma
Just go to the contact trigger, open it in edit mode and save it. If there are other classes refered in the code of trigger open them and save them. By opening them and saving you will recompile. most likely any of them will give you compilation error , you just need to fix it.
Patrick HanahanPatrick Hanahan
Thanks, how do you open the contact trigger? Patrick Hanahan (c) 610.246.8841 (e) hanahan.patrick@gmail.com
Shashikant SharmaShashikant Sharma
Go to setup => Search for contact in quick search => Contact => Triggers 

Open the trigger that is giving error. If you are on production org than you need to do this from Eclipse IDE or better woould be to set up a sandbox org and do the changes over there and push those changes via Change Sets.
Patrick HanahanPatrick Hanahan
I do not see trigger under contact. Is there another name for trigger? Patrick Hanahan (c) 610.246.8841 (e) hanahan.patrick@gmail.com