• seekerbillycox
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

I am updating a ColdFusion app written for API version 11.1 so that it will work with API version 19. I am encountering a strange issue when trying to retrieve custom fields that may or may not have data in them.

 

I am submitting the following querystring:

SELECT Id, CustomField1__c, CustomField2__c, CustomField3_ID__c, LastModifiedDate FROM Account Where IsPersonAccount = FALSE

 

The XML results simply omit custom fields that have no data, rather than returning the field name and an empty string. This plays havoc with my app since it creates a field list based on the first record in the results.

 

Is there a way to ensure that all fields are returned by the query() call even if they don't have a value?

I am working on a new SF implementation for a business that does process manufacturing and products frequently have prices with up to 12 decimal places.

 

Is it possible to change the product pricing data type to support more than two decimal places?

 

 If so, how?  If not, what is the workaround or best-practices solution?

 

 

Thanks in advance.

I am getting an error as given below when I try to call the method query.

 

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>content-type of the request should be text/xml</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>

 

Statuscode       500 Internal Server Error

 

The Code is given below.

 

<cfset arratest = ArrayNew(1)>

<cfset arratest[1] = 1>

<cfset arratest[2] = 2>

 

<cfinvoke webservice="http://shamseer/projects/Test/Sf/partner.wsdl" method="login" returnvariable="LoginResult">

     <cfinvokeargument value="xxxxxxxxxxxxxxxxxxx">

    <cfinvokeargument value="xxxxxxxxxxxxx">

</cfinvoke>

 

<cfset Url12 = LoginResult.getServerUrl()>

 

<cfhttp url="#Url12#" method="post">

      <cfhttpparam name="queryString" value="SELECT Id, Name FROM Account WHERE Name = 'S'">

      <cfhttpparam name="SOAPAction" value="query">

      <cfhttpparam name="sessionid" value="#LoginResult.getsessionid()#">

</cfhttp>

<cfdump var="#cfhttp#">

 

After this I have given another try with XML as given below.

 

<cfinvoke webservice="http://shamseer/projects/Test/Sf/partner.wsdl" method="login" returnvariable="LoginResult">

     <cfinvokeargument value="xxxxxxxxxxxxxxxxxxx">

    <cfinvokeargument value="xxxxxxxxxxxxxxxxxxx">

</cfinvoke>

 

<cfset Url12 = LoginResult.getServerUrl()>

 

<cfoutput>

<cfsavecontent variable = "querySOAP"><?xml version="1.0" encoding="UTF-8"?>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">

  <S:Header>

    <ns2:SessionHeader xmlns="urn:fault.partner.soap.sforce.com" xmlns:ns2="urn:partner.soap.sforce.com" xmlns:ns3="urn:sobject.partner.soap.sforce.com">

      <ns2:sessionId><![CDATA[#LoginResult.getsessionid()#]]></ns2:sessionId>

    </ns2:SessionHeader>

    <ns2:CallOptions xmlns="urn:fault.partner.soap.sforce.com" xmlns:ns2="urn:partner.soap.sforce.com" xmlns:ns3="urn:sobject.partner.soap.sforce.com">

      <ns2:client><![CDATA[MIIESzCCA7SgAwIBAgIQe……]]></ns2:client>

      <ns2:defaultNamespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>

    </ns2:CallOptions>

  </S:Header>

  <S:Body>

    <ns2:update xmlns="urn:fault.partner.soap.sforce.com" xmlns:ns2="urn:partner.soap.sforce.com" xmlns:ns3="urn:sobject.partner.soap.sforce.com">

      <ns2:sObjects>

        <ns3:type><![CDATA[Opportunity]]></ns3:type>

        <ns3:Id><![CDATA[0064000000Ak5PMAAZ]]></ns3:Id>

        <Name xmlns:ns4="urn:fault.partner.soap.sforce.com" xmlns=""><![CDATA[Invalid-Sale one]]></Name>

      </ns2:sObjects>

    </ns2:update>

  </S:Body>

</S:Envelope></cfsavecontent>

</cfoutput>

 

<cfhttp url="#Url12#" method="post">

    <cfheader value="text/xml; charset=utf-8" />

    <cfhttpparam value="#querySOAP#" />

    <cfhttpparam name="SOAPAction" value="update">

</cfhttp>

 

This shows an error as given below. When I take it in 'Chrome browser'. IE and FF shows similar error saying that invalid XML.

 

This page contains the following errors:

error on line 114 at column 2: StartTag: invalid element name

Below is a rendering of the page up to the first error.

 

Help pls...

 

Thanks in advance...

  • June 17, 2010
  • Like
  • 0

I am working on a new SF implementation for a business that does process manufacturing and products frequently have prices with up to 12 decimal places.

 

Is it possible to change the product pricing data type to support more than two decimal places?

 

 If so, how?  If not, what is the workaround or best-practices solution?

 

 

Thanks in advance.