Salesforce for Outlook: The operation is not valid for the state of the transaction sync error
|Knowledge Article Number||000231928|
Salesforce for Outlook sync fails with the following error message during syncing of Events (and Contacts, possibly Tasks).
Sync Failed. Check the logs for details. Unable to sync. Review the appropriate log for details. The operation is not valid for the state of the transaction
INFO [Event] Resync CalledAnd Trace.log will show a timeout related exception/error such as:
System.Transactions.TransactionException: The operation is not valid for the state of the transaction. ---> System.TimeoutException: Transaction Timeout
The root cause is a SFO timeout exception due to org/user having many Unresolved Items (Contacts, Events, Tasks, Email).
1. Exit SFO
2. Login to Salesforce
3. On the Home tab, click on Unresolved Items option
4. Resolve all items (Contacts, Events, Tasks) in that queue either by assigning or not assigning them but clearing up the queue - using Batch Edit would be useful.
5. Restart SFO
Alternatively, some users may not see unresolved items either under Contacts. It is possible in the past, they had synced Contacts but later disabled its sync due to some sync issues and currently are only syncing Events. In that case, they may still have many unresolved items for Contacts which are not visible to them in Unresolved Items queue.
To view the Contacts, and resolve them:
1. Exit SFO
2. Create a test contact in Outlook with the Company name that does not match with any account in Salesforce
*Use a new Contacts folder for this
3. Create a test event and include the above contact's business card in that event before syncing.
4. Change SFO config to enable Contact sync and choose sync both ways option - Important: use a Contact sync filter which does not sync any data from Salesforce (so that user does not get unwanted data from Salesforce to Outlook)
5. Launch SFO, complete the setup wizard and start syncing
6. Observe that after syncing there are few Unresolved Items in Salesforce (contacts and/or events)
7. Resolve all the items in Unresolved Items - Batch Edit can be used to select all and use "Don't Assign"
(Note: Not all items need to be resolved but enough as long as SFO client does not timeout)
8. Restart SFO and sync
9. Undo any changes to SFO config, have customer go through the SFO wizard again and continue syncing