Tuesday, 21 May 2013

SalesForce - Tips

Sales force

 Errors I have encountered while trying to connect without much reading

   LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, password, security token; or user locked out. Are you at a new location? When accessing Salesforce--either via a desktop client or the API--from outside of your company’s trusted networks, you must add a security token to your password to log in.To receive a new security token, log in to salesforce.com at http://login.salesforce.com and click Setup | My Personal Information | Reset Security Token.
      Update password field of your log in with merged password and security token
      var response = sforce.login(LoginUserName, LoginUserPassword + LoginSecurityToken);


Creating custom fields

 I have used designer to generate custom fields in my object and generated WSDL but my custom field is not present in generated XML.


 Go to: Account => Setup =>App Setup=>Objects

Open object you want to edit. Click on field you want to make visible.

 Click on highlighted "Set Field-Level Security"

Set appropriate visibility read only levels.

Used references:

reference book
Creating custom fields