Integrations and APIs for Service

Get Involved. Join the Conversation.


    Virginia Neal
    Value not found for element DataValue - Setting a Custom...
    Topic posted June 2, 2011 by Virginia NealGreen Ribbon: 100+ Points, last edited October 29, 2011 
    1901 Views, 18 Comments
    Value not found for element DataValue - Setting a Custom Field When Creating an Incident

     Using RightNow Connect I am sending an XML Object to create an Incident.  If the XML object does NOT contain any custom fields the incident is created and all is well.  As soon as I try add an element for CustomFields, the message failes with a status code 500 and the error message "RightNowSyncService| failed Value not found for element DataValue which has minOccurs = 1 Failed in constructing object Incident : NULL input can not be deserialized Failed in setting value for element CustomFields array position 0 of object Incident Failed in constructing object CreateMsg : NULL input can not be deserialized Failed in setting value for element RNObjects array position 0 of object CreateMsg Failure in setting value for object Create element Create of type messages_ws_rightnow_com_v1::CreateMsg NULL returned from the Create deserializer due to missing or invalid XML"

    I have tried all kinds of variations when building the XML and nothing seems to work.  Can someone please take a look at the XML and see if you can spot what I might be doing wrong?

    The code block contains all the XML, but the code below is the what is causing the error:

                    <s1:GenericField name="Owner">
                        <s2:IDValue id="#owner#" />

    When the snippet above is included in the XML my attempt to create an incident fails.  When the snippet is NOT included, the incident is created just fine.

    The custom field I am trying to populate is named Owner and it contains an ID.  The value being passed is set to 80.  The attached image shows the value being passed. 

    Been fighting with this for quite awhile, so any help would be appreciated.


    Code Snippet:


    • Virginia Neal

       JUST GOT IT!!!!

      I was looking at the custom field and noted the name of the field is Owner, but the column name is owner.  The column name is all lower case, so I change the XML to c$owner and it worked!!  Final code is:

                 <s1:CustomFields dataType="NAMED_ID" name="c$owner">
                        <s2:ID id='#owner#' />       

      THANK YOU VERY MUCH!!!  You have been great help and I could not have done this without your assistance!

    • Daniel Andrews

      I see. I'm suspecting that the Owner custom field was not configured correctly. What I suggest is that you do a GetMetaDataForClass on Incident, and see whether 'c$Owner' appears in the metadata as you expect.

    • Daniel Andrews

      Oh great :) You're very welcome - feel free to bring whatever questions you have to these forums. Good luck!