Topic by Bruno Vasconcellos
Hello,
I'm trying to update some Organization fields (vanilla and custom) by XML, but the below code only updates to NAMED_ID (<ns2:GenericFields dataType="NAMED_ID" name="type">) and will not update any subsequent ones.
In the other words, in this case, only the "cnpj" and "type" fields are updated, the rest don't.
Could someone help me?
XML CODE:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<ns7:ClientInfoHeader xmlns:ns7="urn:messages.ws.rightnow.com/v1_2" soapenv:mustUnderstand="0">
<ns7:AppID>Basic Update</ns7:AppID>
</ns7:ClientInfoHeader>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" mustUnderstand="1">
<wsse:UsernameToken>
<wsse:Username>xxxxx</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxxxxx</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ns7:Update xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
<ns7:RNObjects xmlns:ns4="urn:objects.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:Organization">
<ID xmlns="urn:base.ws.rightnow.com/v1_2" id="14" />
<ns4:CustomFields xmlns:ns2="urn:generic.ws.rightnow.com/v1_2" xsi:type="ns2:GenericObject">
<ns2:GenericFields dataType="OBJECT" name="c">
<ns2:DataValue>
<ns2:ObjectValue xsi:type="ns2:GenericObject">
<ns2:GenericFields dataType="STRING" name="cnpj">
<ns2:DataValue>
<ns2:StringValue>12345</ns2:StringValue>
</ns2:DataValue>
</ns2:GenericFields>
<ns2:GenericFields dataType="NAMED_ID" name="type">
<ns2:DataValue>
<ns2:NamedIDValue><Name xmlns="urn:base.ws.rightnow.com/v1_2">Cliente especial</Name></ns2:NamedIdValue>
</ns2:DataValue>
</ns2:GenericFields>
<ns2:GenericFields dataType="STRING" name="descricao">
<ns2:DataValue>
<ns2:StringValue>Descrição do cliente aqui.</ns2:StringValue>
</ns2:DataValue>
</ns2:GenericFields>
<ns2:GenericFields dataType="STRING" name="telefone">
<ns2:DataValue>
<ns2:StringValue>11999999999</ns2:StringValue>
</ns2:DataValue>
</ns2:GenericFields>
<ns2:GenericFields dataType="STRING" name="fax">
<ns2:DataValue>
<ns2:StringValue>11999999999</ns2:StringValue>
</ns2:DataValue>
</ns2:GenericFields>
<ns2:GenericFields dataType="STRING" name="email">
<ns2:DataValue>
<ns2:StringValue>cliente@cliente.com</ns2:StringValue>
</ns2:DataValue>
</ns2:GenericFields>
</ns2:ObjectValue>
</ns2:DataValue>
</ns2:GenericFields>
</ns4:CustomFields>
<ns4:Name>Nome do cliente aqui</ns4:Name>
</ns7:RNObjects>
<ns7:ProcessingOptions>
<ns7:SuppressExternalEvents>false</ns7:SuppressExternalEvents>
<ns7:SuppressRules>false</ns7:SuppressRules>
</ns7:ProcessingOptions>
</ns7:Update>
</soapenv:Body>
</soapenv:Envelope>
---------------
RESPONSE IN SOAPUI:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<n0:UpdateResponse xmlns:n0="urn:messages.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</soapenv:Body>
</soapenv:Envelope>
------
For "Create Request" the problem also occurs. (Same problem).
One similar case on forum without reply: http://communities.rightnow.com/posts/d30470ccc7
Tks.
Bruno Vasconcellos