4

When trying to send a draft, I receive an error:

"ErrorIrresolvableConflict","message":"The send or update operation could not be performed because the change key passed in the request does not match the current change key for the item., Item could not be saved because conflicts were detected when saving.

The message seems to send later when trying in a sandbox.

3 Answers3

4

I fixed this by inserting a timeout between the creation of the draft and sending the draft. Essentially, race condition issues.

Marcus Höglund
  • 16,172
  • 11
  • 47
  • 69
0

while send email using office365, below code is added for to get searchkey to get thread id in future use (if thread id not generated), this code gives error - "The send or update operation could not be performed because the change key passed in the request does not match the current change key for the item", if I attach bigger file in size more than 3 MB.

FileAttachment fileAttachment = new FileAttachment( "C:\\send_files\\100 Percent 
Automated Support - NCUCCC.pdf" );// 4.6MB file attached
AttachmentId attachmentId = service.createAttachment( fileAttachment, messageId );
messageId.setChangeKey( attachmentId.getRootItemChangeKey() );

FileAttachment fileAttachment1 = new FileAttachment( "C:\\send_files\\getting-started-with-hadoop-planning-guide.pdf" );// 3.1MB file attached
AttachmentId attachmentId1 = service.createAttachment( fileAttachment1, messageId );


messageId.setChangeKey( attachmentId1.getRootItemChangeKey() );
messageFromDrafts = service.getMessage( messageId );
searchKey = messageFromDrafts.getSearchKey();
service.send( messageId );

below code works fine to send email with attachment of bigger size files. so better use this code to send email with attachment of bigger files.

ItemInfoResponse response = service.send( messageId );

below 3 MB file size as attachment is not giving any issue

raj kumar
  • 1
  • 1
0

CalendarItem.changekey changes somewhere in between create of calendar entry to edit calendar entry. I use filter with subject and get CalendarItem again and use edit on it

jay fegade
  • 83
  • 8