Showing posts with label WSDL. Show all posts
Showing posts with label WSDL. Show all posts

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.
       
  Resolution
      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.

Solution:

 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

Monday, 25 March 2013

c# generate class from wsdl definition

How to generate cs file from wsdl

  1. Save file to place where you can read and write
  2. open Developer command prompt for VS 2010/2012
  3. Execute command (update where you need)

wsdl yourWsdlDefinition.wsdl /out:MyProxyClass.cs