Skip to main content

Posts

Showing posts from January, 2009

How to create custom hyperlink field in Salesforce

Salesforce.com allows you to create a custom field with type URL. However, sometimes you may want to create a custom URL for your special requirements. For example, you have a separate application call Human Resource Management (HRM) Your Salesforce application contains a custom field call EmployeeID__c in Contact object Contact tab layout: ------------------------------------------------------- Contact name | EmployeeID| E-mail | ... ------------------------------------------------------- Thao Truong | 000111 | abc@yahoo.com | -------------------------------------------------------- John Peter | 000112 | abc@gmail.com | --------------------------------------------------------- When user clicks on EmployeeID cell, you would like it can be linked to your HRM application with the link like that: http://YourHRM/Employees.aspx?ID=000111 or http://YourHRM/Employees.aspx?ID=000112 In this case, you could create a new custom field EmployeeID...

Get Salesforce Data with Partner WSDL

DataTable GetSforceData(string strSQL, int iBatchSize) { DataTable dt = null; partner.SforceService binding = new partner.SforceService(); string strAccountName = "", strAccountPassword = "", strSecurityToken = ""; //get account name, account password and security token here bll = null; partner.LoginResult lr = binding.login(strAccountName, strAccountPassword + strSecurityToken); if (!lr.passwordExpired) { binding.Url = lr.serverUrl; binding.SessionHeaderValue = new partner.SessionHeader(); binding.SessionHeaderValue.sessionId = lr.sessionId; partner.QueryResult qr = null; binding.QueryOptionsValue = new partner.QueryOptions(); binding.QueryOptionsValue.batchSize = iBatchSize; binding.QueryOptionsValue.batchSizeSpecified = true; qr = binding.query(strSQL); bool done = false; if (qr.size > 0) { dt = new DataTable(); partner.sObject sOtmp = (partner.sObject)qr.records[0]; for ...

Steps to reset security token in Salesforce

Login to Salesforce with your account Select Setup Select My Personal Information Select Reset My Security Token Click the button Reset Security Token An e-mail will be sent to your account with the token, get this token and use it in your application If the security token is not correct, your application may show an error like that: {"INVALID_LOGIN: Invalid username, password, security token; or user locked out."}