Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Two update calls for some records while performing upsert operation in CRM 365

Posted on by Microsoft Employee

Hi,

I am working with Microsoft Dynamics CRM 365. I have a wcf service through i will perform CRUD operations using sdk. I am sending one upsert request with some mandatory parameters and ownerid which i want to assign. When i check in Audit summary it shows me list of events in the following manner for one request:

1) Create event   Create Operation

2) Assign             Update Operation

which is correct and expected

But for some records list of events are like

1) Create event   Create Operation

2) Assign             Update Operation

3) Assign             Update Operation

Here it will assign owner id to some random value which is not correct

Suppose when create operation is performed it is assigned to some ownerid lets say value=a

when update is performed for that same call it will assign ownerid from value=a to value=b which is correct but this another update which is happening for some records change ownerid value=b to value=c which is incorrect.

I dont have any clue why this is happening.

Note: No background worker or plugin is working here. I had already checked.

Please suggest something. I am having some time crunch.

 
 

*This post is locked for comments

  • Verified answer
    Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    Hi,

    You should try like this;

    - first step retrieve record and check if exists or not

    - if exists use Update Request with mandatory fields

    - if not use Create (insert) Request with mandatory fields

    - after create or update your record use Assign request (or just Update OwnerId field with updated SDK, you should check this msdn.microsoft.com/.../microsoft.crm.sdk.messages.assignrequest(v=crm.8).aspx  and msdn.microsoft.com/.../dn932124.aspx)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    @Emre yes I am facing this issue for upsert operation. So you mean to say that this issue is from Dynamics CRM side?

  • Verified answer
    Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    Hi,

    Sorry for late answer. Actually D365 has some bugs and buggy-features for this release, for example inside plugin "IPluginExecutionContext"'s "BusinessUnitId" returns wrong value and some functions that recommended for deprecated messages not working correctly.

    I think your problem is about "Upsert" message, maybe you can try to use seperate "Insert" and "Update" messages, of course you need query your record with "Retrieve" message before to use Insert or Update.

    After all this process, if your problem is still continue sorry friend but maybe you missed something inside your project (some async process, plugins, scheduled jobs etc) or you should open ticket to Microsoft help.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    @Emre.. I am having issue with account entity and upsert operation.  Any clue. Its really urgent. I am stuck because of this issue from a long time

  • Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    Hi,

    If you have problem on "Case / Incident" entity, maybe you should check "Settings > Service Management > Routing Rule Settings". It's like "workflow" for case records.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    @Emre.. what if its not related to some specific user. Is there something which we can check in CRM?

  • Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    Hi,

    Actually it's hard to say something withour any exception / log data, but if this happens for specific user maybe you focus on user / team privileges etc.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    @Emre.. Yes its happening like this. Everytime when i am trying to update from a to b it will update a to b then automatically from b to c

  • Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    Hi,

    So do you find any similar record? For example (in your post) "ownerid value=b to value=c"  is always "B and C" or "X to Y" or "A to X"?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Two update calls for some records while performing upsert operation in CRM 365

    @Emre.. instance is ONLINE CRM. I dont think there is some issue with business rule because in that case it should give problem for each and every record but thats not the case. This issue is appearing randomly. Once in 100 records.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans