none
Microsoft CRM Dynamics 4.0 error RRS feed

  • Question

  • Hi Friends,

     

    I am facing a strange behaviour from Microsoft CRM Dynamics 4.0 Adapter for the below scenario.

     

    We have an entity in CRM with a name “Company_project” ( it is a custom entity). We also have an attribute in that entity with the same name “Company_project” (it is a primary attribute) . When we pass the request to the CRM using the adapter, all the data is getting concatenated and getting shown in the  “Company_project” (attribute) field. The record is getting created in CRM.

     

    I suspect this behaviour is being caused because of the attribute and entity having the same name.  Below is the request which we are sending to the CRM .

     

    Sales Order Request

    <ns1:Company_project crm_action="CREATE" xmlns:ns1="http://schemas.microsoft.com/crm/2007/ASIACRM/Entities">
     <ownerid type="systemuser" IsNull="false" dsc="0" name="String">821DFD6D-FF2B-DF11-A7CF-00155D50C806</ownerid>
     <transactioncurrencyid IsNull="false" name="" type="transactioncurrency" dsc="0">9A7F5C45-3960-DE11-864B-00155D87D40F</transactioncurrencyid>
     <Company_accountid>FCC33C62-BE75-DF11-A3B1-00155D50C806</Company_accountid>
     <Companycn_foreigncurrencycode>CNY</Companycn_foreigncurrencycode>
     <Company_povalue>1711.16</Company_povalue>
     <Company_projectalise>SBVA / No 301, Unit C, Yuehai Garden, Huayuan Xincun / 512026 Shaoguan</Company_projectalise>
     <Company_projectid></Company_projectid>
     <Companycn_contractdeliverydate>2010/07/05T00:00:00</Companycn_contractdeliverydate>
     <Companycn_contractid>CA1E76F4-9687-DF11-A3B1-00155D50C806</Companycn_contractid>
     <Companycn_contractpodate>2010/07/05T00:00:00</Companycn_contractpodate>
     <Companycn_contractsapid>8619002756</Companycn_contractsapid>
     <Companycn_customerpodate>2010/07/05T00:00:00</Companycn_customerpodate>
     <Companycn_customerponumber>TESTPOALLIN</Companycn_customerponumber>
     <Companycn_deliveryplant>Company Flow Control Beijing</Companycn_deliveryplant>
     <Companycn_deliveryplantnumber>8000</Companycn_deliveryplantnumber>
     <Companycn_enduserid>FCC33C62-BE75-DF11-A3B1-00155D50C806</Companycn_enduserid>
     <Companycn_endusersapid>0000204204</Companycn_endusersapid>
     <Companycn_sapid>8618009695</Companycn_sapid>
     <Companycn_shiptopartyid>FCC33C62-BE75-DF11-A3B1-00155D50C806</Companycn_shiptopartyid>
     <Companycn_shiptopartyname>SBVA</Companycn_shiptopartyname>
     <Companycn_shiptopartynumber>0000204204</Companycn_shiptopartynumber>
     <Companycn_soldtopartynamesapid>0000204204</Companycn_soldtopartynamesapid>
     <Companycn_soldtopartynumber>SBVALtd</Companycn_soldtopartynumber>
     <Companycn_sourceinstanceid>CHINA</Companycn_sourceinstanceid>
    </ns1:Company_project>
    
    

    Sales Order Response

     

    <ns0:Response xmlns:ns0="http://schemas.microsoft.com/crm/2007/BizTalkAdapter/Response">
     <Header>
      <ReturnCode>0</ReturnCode>
      <ErrorCode>0x80044331</ErrorCode>
      <ErrorString>A validation error occurred. The length of the 'Company_project' attribute of the 'Company_project' entity exceeded the maximum allowed length of '450'. :: Server was unable to process request.</ErrorString>
      <Retryable>0</Retryable>
     </Header>
     <Body>
      <Message></Message>
     </Body>
    </ns0:Response>
    
    

     

    Note : '450' is the length of the primary attribute  'Company_project'.

     

    Please let me know if I am missing something. This is a very critical issue. Would really appreciate if you could help me with some leads for this problem.

     

    Regards,

    Ujjwal

     

    ujjwal.devarapalli@hcl.in

     

    Friday, July 9, 2010 1:30 PM

Answers

  • Hi,

    While the issue might be on the CRM side, I would attempt to modify the schema associated with the request message by changing the Type Name property of the Attribute Company_project.  Also you could modify the Type Name property associated with the schema itself.  

    When the project containing the schema associated with your request message is compiled, a .NET class will be generated for each top level element contained within the schema.

    Thanks,

    William 

    Monday, July 12, 2010 2:13 PM

All replies

  • Hi,

    You should be able to edit the attribute in the attributes section.  

    Referenced from the CRM forum

    http://social.microsoft.com/Forums/en/crm/thread/ac6aa8eb-9af4-4cfe-bd3f-38009e37400b

    Thanks,

    William

    Friday, July 9, 2010 3:57 PM
  • Thanks for your reply William :)

    Even if we increase the length of this column in the CRM, we might not get thi sissue resolved because the adapter is not able to differentiate between the Entity and the Attribute.

     

    If we increase the column length also, we might get part of the problem resloved like being able to pass more than 450 characters of data. But the problem of all the data getting jammed up into one attribute might not be resolved.

    Is there any way we can make sure that the adapter maps the Primary attributes text to it correctly.

    Regards,

    Ujjwal

    Sunday, July 11, 2010 11:54 AM
  • Hi,

    While the issue might be on the CRM side, I would attempt to modify the schema associated with the request message by changing the Type Name property of the Attribute Company_project.  Also you could modify the Type Name property associated with the schema itself.  

    When the project containing the schema associated with your request message is compiled, a .NET class will be generated for each top level element contained within the schema.

    Thanks,

    William 

    Monday, July 12, 2010 2:13 PM