AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 20.09.2011, 23:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,491 / 846 (79) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Synchronizing AX to Outlook Cannot edit a record in Activities (smmActivites) An update conflict occured
Источник: http://blogs.msdn.com/b/emeadaxsuppo...t-occured.aspx
==============

We recently came across a problem with Outlook synchronization with the AX2009 client. The problem was that sometimes when a user synchronized it failed with the error message:

"Cannot edit a record in Activities (smmActivites). An update conflict occured due to another user process deleting the record or changing one or more field in the record."

This could not be reproduced and seemed to be happening in a random way. However we did find a situation that causes this to happen, and a way to prevent it, so if this is happening to you then please read on...

My final repro scenario is this:
- Create an appointment on machine A and synchronize with AX.
- On Machine B, open outlook (it must have been already closed when creating the appointment on machine A) wait for it to see the new appointment. Synchronize with AX.
- The error will be displayed.

The reason that this causes a problem is because Outlook on machine B picks up a different entryId for the person assigned to the appointment. EntryIds are store specific. So what is happening when trying to synchronize with AX is that the process first finds that the existing attendee in AX which has for example entryId=1 (actually this is a crazy guid value, but let's use 1 for this example) is no longer listed on the appointment from Outlook, so it removes them, and it also sees that the attendee was the owner of the appointment so it deletes the smmActivities record - then in the same transaction it find now it has a new attendee for the same appointment with entryId=2 and it tries to add them the appointment and update it - but it has just been deleted so we fail with the error as we try to delete the appointment.

From our investigation this is a limittion of the Outlook synchronization - we have a feature in CRM->periodic->microsoft office outlook synchronization->migrate which allows a user to clear all links with their Outlook so they can migrate to a new OS or a new machine - which shows that this is not expected to synch from multiple different machines at the same time.

Having said that, it was possible in this scenario to change the X++ code to cope with the situation described above, you can add a check, when deciding to delete an attendee during the synchronize, to check whether the related activity has a new owner with the same emplId – if it does then we know we shouldn’t delete it.

In Classes\SmmOutlookSync_Appointment.syncAttendeesOutlookToAxapta()

Existing code:

<div style="background-color: lightgray; font-family: Courier New; font-size: 8pt; padding: 5px 5px 5px 5px;">

// Delete attendees in axapta which were deleted in outlook
i = 1;
while (!_syncOnlyOrganizer && i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
An update conflict occurred due to another user process deleting the record or changing one or more fields in the record ideveloper DAX: Программирование 5 08.08.2011 18:52
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35
emeadaxsupport: List of fixes that improve performance of certain features in Dynamics AX 2009 Blog bot DAX Blogs 0 13.10.2009 19:06
dynamic-ax.co.uk: Import Emails from Outlook 2007 into Dynamics AX 2009 Blog bot DAX Blogs 1 03.07.2009 07:17

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 00:11.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.