web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Getting value as null for the properties having datatype as "decimal" in Create Account using SOAP CRM 2016 OnPremise

(0) ShareShare
ReportReport
Posted on by

Hi,

I am trying to create a Account using SOAP and request is executing successfully. But actually all the properties having datatype "decimal" are getting saved as null.

Please find the create account request snippet below:

<soap:Envelope xmlns:soap="schemas.xmlsoap.org/.../envelope" xmlns:ser="schemas.microsoft.com/.../Services" xmlns:con="schemas.microsoft.com/.../Contracts" xmlns:sys="schemas.datacontract.org/.../System.Collections.Generic" xmlns:con1="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns:c="www.w3.org/.../XMLSchema">
   <soap:Header/>
   <soap:Body>
      <ser:Create>
         <ser:entity>
            <con:Attributes>
               <con:KeyValuePairOfstringanyType>
                  <sys:key>name</sys:key>
                  <sys:value i:type="c:string">soap_account_1</sys:value>
               </con:KeyValuePairOfstringanyType>
               <con:KeyValuePairOfstringanyType>
                  <sys:key>openrevenue</sys:key>
                  <sys:value i:type="c:decimal">120.20</sys:value>
               </con:KeyValuePairOfstringanyType>
               <con:KeyValuePairOfstringanyType>
                  <sys:key>creditlimit</sys:key>
                  <sys:value i:type="c:decimal">12000.50</sys:value>
               </con:KeyValuePairOfstringanyType>
            </con:Attributes>
            <con:LogicalName>account</con:LogicalName>
         </ser:entity>
      </ser:Create>
   </soap:Body>
</soap:Envelope>

I also tried the same data with REST API and its working fine. But there is some problem with SOAP.

Am I missing something while creating Account using SOAP? 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rahul-Waghmare Profile Picture
    990 on at

    Hi,

    Try like this.

    <a:KeyValuePairOfstringanyType>

               <c:key>DecimalInArgument</c:key>

               <c:value i:type='d:decimal' xmlns:d='www.w3.org/.../XMLSchema&;>10.0</c:value>

    </a:KeyValuePairOfstringanyType>

    Regards,

    Rahul

  • Community Member Profile Picture
    on at

    Hi Rahul,

    I tried the solution suggested by you, but getting same result, value getting null for as null.

  • Suggested answer
    Rahul-Waghmare Profile Picture
    990 on at

    Hi Rajinder,

    Please check below blog, its having so many message collections.

    mileyja.blogspot.co.uk/.../microsoft-dynamics-crm-2011-sdk-example.html

    Regards,

    Rahul

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans