Topic by Tushar Kapadi
Hello,
I am trying to update Custom Field on Organization using SOAP UI and it throws following exception:
Could not find property for given key: Customer_Number
While processing Organization->CustomFields(rng_v1::GenericField[]).
When I went to RightNow, I figured out that field I am trying to update is not created under Custom Field but I can see that under Object Designer -> CO -> Organization package. I am not sure how to update this field through web service. Should I treat as out of the box field and use GenericField to update or should I treat as custom field and use CustomField to update.
I tried both but no luck.
1) Trying to update using CustomField:
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns7:Update xmlns:ns7="urn:messages.ws.rightnow.com/v1">
<ns7:RNObjects xmlns:ns4="urn:objects.ws.rightnow.com/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:Organization">
<ID xmlns="urn:base.ws.rightnow.com/v1" id="1" />
<ns4:CustomFields dataType="STRING" name="c$Customer_Number">
<DataValue xmlns="urn:generic.ws.rightnow.com/v1">
<StringValue>CF</StringValue>
</DataValue>
</ns4:CustomFields>
</ns7:RNObjects>
</ns7:Update>
</soapenv:Body>
</soapenv:Envelope>
Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Sender</faultcode>
<faultstring>Could not find property for given key: Customer_Number
While processing Organization->CustomFields(rng_v1::GenericField[]).</faultstring>
<detail>
<n0:RequestErrorFault xmlns:n0="urn:faults.ws.rightnow.com/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<n0:exceptionCode>UNKNOWN_EXCEPTION</n0:exceptionCode>
<n0:exceptionMessage>Could not find property for given key: Customer_Number
While processing Organization->CustomFields(rng_v1::GenericField[]).</n0:exceptionMessage>
</n0:RequestErrorFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
2) Trying to update using GenericField
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns7:Update xmlns:ns7="urn:messages.ws.rightnow.com/v1">
<ns7:RNObjects xmlns:ns2="urn:generic.ws.rightnow.com/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:GenericObject">
<ID xmlns="urn:base.ws.rightnow.com/v1" id="12" />
<ns2:ObjectType>
<ns2:TypeName>Organization</ns2:TypeName>
</ns2:ObjectType>
<ns2:GenericFields dataType="STRING" name="Customer_Number">
<ns2:DataValue>
<ns2:StringValue>Test</ns2:StringValue>
</ns2:DataValue>
</ns2:GenericFields>
</ns7:RNObjects>
</ns7:Update>
</soapenv:Body>
</soapenv:Envelope>
Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Sender</faultcode>
<faultstring>Unknown field for Organization: Customer_Number
While translating GenericObject to Organization processing GenericField at index 0
While trying to process GenericObject as Organization</faultstring>
<detail>
<n0:RequestErrorFault xmlns:n0="urn:faults.ws.rightnow.com/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<n0:exceptionCode>INVALID_FIELD</n0:exceptionCode>
<n0:exceptionMessage>Unknown field for Organization: Customer_Number
While translating GenericObject to Organization processing GenericField at index 0
While trying to process GenericObject as Organization</n0:exceptionMessage>
</n0:RequestErrorFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
I did try with different permutation and combination with 'CO.Customer_Number', 'C$Customer_Number' and so on but nothing seems to be working.
I am wondering how can i update a field that is not defined as custom field but defined under CO package in object designer. I am attaching the screen shot from RightNow for your reference.
Thanks,
--Tushar