Forums

 
ForumForumPlug-in and Pla...Plug-in and Pla...Outlook Plug-inOutlook Plug-inSync Delete Not WorkingSync Delete Not Working
Previous Previous
 
Next Next
New Post
 11/26/2007 6:19 PM
 

In September, I updated the plugin source I am using with the latest updates from SplendidCRM.  This update appears to have broken some functionality.  Specifically, synchronizing the deletion of a contact. 

I dug through the changes and came accross this potential change within SyncContacts()

Old way:

CRM.set_entry_result oSetResult = crm.set_entry(_sSessionID, "Contacts", Contact.DeleteNameValueList(sID));

New Way:

// 09/25/2006 Paul.  A contact is not deleted in SugarCRM 4.2, instead, the relationship is deleted. CRM.set_relationship_list_result oSetResult = crm.set_relationships(_sSessionID, Contact.DeleteRelationshipList(sID));

I agree that the 'New Way' to delete the relationship instead of the actual contact is the best route to go.  BUT, the new way results in a call to

[spCONTACTS_USERS_Update]( @MODIFIED_USER_ID uniqueidentifier, @CONTACT_ID uniqueidentifier, @USER_ID uniqueidentifier)

that fails.  There is no code within this proc to delete a relationship.  Also, the @USER_ID is sent in with a null value to indicate that the relationship should be deleted.  I don't see how that can work.  Just knowing the CONTACT_ID is not enough as multiple users can be syncing with the same CONTACT_ID.  Are we to assume that the MODIFIED_USER_ID should be used in conjuction with the CONTACT_ID to determine the relationship that should be deleted??  And again, the latest version of this proc does not have any logic checking to see if a relationship should be deleted.  Has this been corrected? 

I am on SplendidCRM version 1.2 but I reviewed the 1.4 code on my test server re/ spCONTACTS_USERS_Update. 

Please advise.  Thanks in advance. 

New Post
 11/27/2007 3:17 AM
 

Please check the latest version of soap.asmx.cs.  On 05/14/2007, we added code to detect when the USER_ID is null and we treat this as the delete event.  We use the ID of currently authenticated user when deleting.

This is yet another poor Sugar design that we follow.

 

New Post
 11/27/2007 11:16 AM
 

Ok, I thought I had the latest version.  Thanks, got it working just fine.  Question though.  I believe I also have the latest version of the plugin source.  Why not remove the 'Synchronize delete of Contacts between Outlook and CRM' option on the Settings/Actions Tab?

Previous Previous
 
Next Next
ForumForumPlug-in and Pla...Plug-in and Pla...Outlook Plug-inOutlook Plug-inSync Delete Not WorkingSync Delete Not Working