function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bssantoshbssantosh 

Updating Custom Date Field

Hi,
I have created a new custom date field and am looking to update that field using the update method provided by the sforce API. However i cannot find the custom field i created in the WSDL file.
How do i update that field if it does not exist?
Where am i going wrong.......?
 
Thanks in advance.
SteveBowerSteveBower
The WSDL used by the Ajax toolkit is the Partner WDSL which is generic and doesn't have your specific fields.  If you use a tool like the Eclipse plug-in, you can easily browser your schema and see the field names.

In the general case, if you create a custom field with the name: "My_Cool_New_Date_Field", then the property of the Dynabean object will be:  "my_cool_new_date_field__c".  Note the extra double-underscore and a "c".   Case doesn't matter, I just user lower case for field names.

You could also issue a describe call and show yourself the results:

Code:
var flds = sforceClient.DescribeSObject("opportunity").fieldList;
alert("opportunity fields are:\n" + flds);

Hope this helps, Steve Bower.

 




bssantoshbssantosh
Thanks Steve, It worked.