Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Execute multiple requests in transaction error in crm 2015

Posted on by Microsoft Employee

i developed an application using the CRM 2015 SDK(v7.1.2). i want to send 2 requests for crm by ExecuteTransactionRequest, but i got an error:

The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter
 schemas.microsoft.com/.../Services:request. The
 InnerException message was 'Error in line 1 position 451. Element
 'schemas.microsoft.com/.../Services:request'
contains data from a type that maps to the name
 'schemas.microsoft.com/.../Contracts:ExecuteTransactionRequest'.
 The deserializer has no knowledge of any type that maps to this name.
Consider changing the implementation of the ResolveName method on your
DataContractResolver to return a non-null value for name
 'ExecuteTransactionRequest' and namespace
 'schemas.microsoft.com/.../Contracts'.'

3683.1.jpg

i used this link: https://msdn.microsoft.com/en-us/library/mt634414.aspx

please help me!!!

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Execute multiple requests in transaction error in crm 2015

    Hi Pawel

    Thanks.

  • Verified answer
    tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: Execute multiple requests in transaction error in crm 2015

    Hi arioamir,

    See section "Execute messages in a single database transaction" in:

    msdn.microsoft.com/.../gg328075(v=crm.7).aspx

    What you have found is that this message is in your client SDK, but that does not imply that it is also on the server. You have SDK 7.1 but on the server you have 7.0 - go to your CRm installation directory (probably C:\Program Files\Microsoft Dynamics CRM), go to Server/bin and check the version of Microsoft.Xrm.Sdk.dll. It will be something like 7.0.1 and it does not contain this message.

    Iagree that MS online documentation is misleading, because it shows this message for CRM 2015, but unfortunately it's not available there.

    As for transaction you can do this like we all did before CRM 2015 update 1 - by using CRM Command pattern. Create an entity (call it Command or whatever) and make a plugin that runs on Create (for example there can be many approaches but this is the simpliest). Everything that you do in plugin in Stage 20 and 40 will be run in transaction, so you can put this logic in this plugin. Of course this "Command" entity can have some parameters that you pass in, so you can different logic for different parameters that you pass to that entity. Hope that is clear for you. This is not as elegant like ExecuteTransaction but does it's job very well and it had to be done like that for many versions of CRM so I'm sure it works :)

    Pawel

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Execute multiple requests in transaction error in crm 2015

    Hi pawel,

    Do you have a link for introducing this message in update 1?

    This link show this message in crm dll:

    msdn.microsoft.com/.../microsoft.xrm.sdk.messages.executetransactionrequest(v=crm.7).aspx

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Execute multiple requests in transaction error in crm 2015

    Hi Marius

    How do i use Transaction in crm? Do you have any ideas?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Execute multiple requests in transaction error in crm 2015

    Hi pawel

    What can i do? I don't use online version

  • Marius Agur Pedersen Profile Picture
    Marius Agur Pedersen 1,771 on at
    RE: Execute multiple requests in transaction error in crm 2015

    The problem is, as Pawel Graecki says, that the message was introduced in Update 1 for MSCRM 2015.

    Update 1 was never released on-premises, so that's why it doesn't work.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Execute multiple requests in transaction error in crm 2015

    Hi Marius

    Unfortunately I don't use early bound. But i wrote EnableProxyTypes.

    Do you suggest i use early bound?

  • tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: Execute multiple requests in transaction error in crm 2015

    This message was introduced in Update 1 for online so I don't think it's in Update 0.1

  • Marius Agur Pedersen Profile Picture
    Marius Agur Pedersen 1,771 on at
    RE: Execute multiple requests in transaction error in crm 2015

    This issue can occur if you've forgotten to enable proxy types. If you're using early bound classes you need to have this in your code:

    service.EnableProxyTypes();

    Also, there is a known bug when you use an earlier version of crmsvcutil to generate proxy classes. Make sure that you've generated the proxy classes using the correct version of the SDK and crmsvcutil.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Execute multiple requests in transaction error in crm 2015

    Hi,

    I use this version : crm is 2015 and update is 0.1 kb3010990. No I don't used wrong sdk. I download it from www.microsoft.com/.../details.aspx .

    other requests work very well but this request ........

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans