Blogs
-
Performing an UPDATE on a Custom Field Using the SOAP Tooling API
QUESTION I’m using the SOAP Tooling API to try and update a CustomField (posting to /services/Soap/T/29.0) The method signature is SaveResult[] update(sObject[] sObjects) – and CustomField extends sObject so it shouldn’t be a problem to send that down the wire. However I encounter: INVALID_TYPE: Must send a concrete entity type. Then I looked at my raw XML on the wire, I can’t say I’m surprised!…
-
What is the most effective method to verify if person accounts are enabled through Apex Code?
QUESTION I need to be able to check if an org has Person Accounts enabled via Apex Code as part of package. What’s the best way to do this without making the package require Person Accounts be enabled in any org in which it’s installed? ANSWER Method 1 Try to access the isPersonAccount property on an Account and catch any exception that occurs…
-
How can we know State and Country Picklist is enabled or not in an org using Apex Code
Question How can we know State and Country Picklist is enabled in the Salesforce org or not using Apex code SOLUTION When you enable that feature SFDC creates a countryCode field for each object where the address exists. Then you could check if that field exist using something like this: Other generic option: