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
SwamplanderSwamplander 

Getting & setting values in custom fields

We've setup a few custom fields in our Leads & Contacts objects... but I'm not able to see how to get these in from queries or how to update them. So far nothing in the SDK is jumping out or on the wiki. Tips/pointers?

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

QueryResult qr = binding.query("select id, name, someCustomField__c from contact where name like 'fred%');

 

If you're using the enterprise WSDL, remember you'll need to download a new one after you've added new custom fields. Use the wsdl or one of the many schema/soql tools to find out all the object/field names.

All Answers

SuperfellSuperfell

QueryResult qr = binding.query("select id, name, someCustomField__c from contact where name like 'fred%');

 

If you're using the enterprise WSDL, remember you'll need to download a new one after you've added new custom fields. Use the wsdl or one of the many schema/soql tools to find out all the object/field names.

This was selected as the best answer
SwamplanderSwamplander

Duh... didn't think I had to download a new WSDL... but its obvious as to why. Thanks!

Vishal (Sops)Vishal (Sops)

I have created a custom number field (Validation Counter) at contact level and I want to increment its value everytime my tirgger fires. Can anyone help me out in adding code to do this in my trigger. Thank you very much.