FAQ Database Discussion Community


Soap, call a recovery service

php,web-services,soap,wsdl,salesforce
I am new to SOAP. For a project, I need to use "Force.com Toolkit for PHP". I made the first call to open a Salesforce session and retrieve the session ID , which will be used to call the recovery service of customer information. ( It's ok, i have the...

Flask-Restful, oauth, and Salesforce

python,rest,flask,oauth-2.0,salesforce
I am building out a REST service using Flask-RESTful that will allow users to connect to their salesforce Environment and pull data. Is it possible to secure a restful API with oauth2?! I cannot seem to find any documentation this....

Biztalk 2010 - Salesforce CRUD Operation through WSDL purely

wsdl,salesforce,integration,biztalk,biztalk-2010
I am working on BizTalk 2010 and SalesForce integration where I am purely using SalesForce enterprise WSDL to perform all operations. I am successfully able to login and query through WSDL, now my test is I want to do CRUD operation on any object (eg. Quote or Contact etc) using...

How to create a custom tab icon in a Salesforce Managed Package

salesforce
Does anyone know how to create a custom icon for a managed package in Salesforce. I see how to create a custom icon for a custom object tab that is stored in "My Personal Documents" but it will not allow this image to be part of the managed package. Is...

How to add contact from a rails app to saleforce using restforce gem?

salesforce
I am using restforce gem to connect to salesforce api. I have successfully connected to it and initialised the client using username/password like below client = Restforce.new :username => 'foo', :password => 'bar', :security_token => 'security token', :client_id => 'client_id', :client_secret => 'client_secret' I am able to create Account in...

Passing a variable from a list as part of calling a function

python,python-2.7,soap,salesforce
I am using SimpleSalesforce and would like to use the describe() function. An example of that is sf.Contact.describe() to describe the Contact record. I would like to loop through several records in a list, but I'm not sure how to pass in a variable in place of Contact. Objects =...

Ember rootURL with Hash

ember.js,salesforce,visualforce
I'm trying to embed an Ember application into Salesforce, specifically a VisualForce (VF) page. Salesforce uses the convention that your custom VF is available at: https://<instanace>.salesforce.com/apex/<myVFPage> Salesforce does NOT allow sub-folders. For instance, if I try to reach the following URL, it will fail because it will attempt to resolve...

Beatbox: How do I add a WHERE clause when pulling data from SFDC?

python,pandas,salesforce,beatbox
In Pandas, I am creating a dataframe that merges data from two different Beatbox queries. First, I pull all my Opportunity data, then I pull all my Account data, and then I merge. However I would like to optimize this process by only pulling data for account['ID'] that exists in...

Get Grandchild Object Field Values from Parent Object

salesforce,apex,soql,grandchild
I'm a newbie at sales-force apex coding. I have 3 custom objects, Location(Parent) -> Group(child) - > Meeting(grand child). All are related to each other through Master detail relationships. I am trying to get 2 field values from the earliest Meeting Record that belongs to the Location. So far I...

Open VF page when clicked on lookup icon with conditional records

set,salesforce,lookup,apex
i am trying to get this running with some modifications. http://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/ I have to get those accounts of which my contact is having contact role and account which it belongs to. I have written soql query and having different accounts from two ojbects. I saved the list as set to...

How do I upload a file attachment using POST?

swift,salesforce
I've created an audio file I want to attach to an "Order" object in Salesforce. The path to the file is properly located at theSoundPath. The following code causes an error that reads: 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSConcreteData)' I'm encoding the file in base64 as required by...

jqplot - Ticks and labels overlap in salesforce page

jquery,salesforce,jqplot
I was wondering how come implementing jqplot in Salesforce, ticks and labels overlap. Just like this: I tried adjusting everything but still, no luck. It won't even rotate the label when i tried rotating it. This is how I did it: function renderGraph(){ //Days of the month var dayTicks =...

Apex: map.Put() byVal instead of byRef?

java,dictionary,salesforce,apex
I'd like to know if there is a way to .put() an element into a map by value instead of by reference. I have a map> and a loop that fills it, like so: Map<string,List<string>> result = new Map<string,List<string>>(); List<string> temp = new list<string>(); for(CustomObj__c i:customList){ for(CustomObj__c j:customList2){ if(j.id ==...

Mule SFDC connector: redirect_uri_mismatch&error_description=redirect_uri must match configuration

oauth-2.0,salesforce,mule
I am connecting to SFDC with mule connector by oauth, trying to authorize but getting following error message. <flow name="sfdcFlow1" doc:name="sfdcFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${port}" path="sfdc" doc:name="HTTP"/> <sfdc:authorize config-ref="Salesforce__OAuth_v2_0" display="POPUP" accessTokenUrl="https://na1.salesforce.com/services/oauth2/token" authorizationUrl="https://na1.salesforce.com/services/oauth2/authorize" doc:name="Salesforce"/>...

SQL Duplicate rows

sql,salesforce,crm,exacttarget
I am writing a SQL query for my CRM. My table looks like below: EML SubKey ---------- A A A 1 B B C 2 I want to select unique emails and duplicate emails with non-numeric subkeys. The result should look like A A B B C 2 Please help...

Not able to make connection with rest API of Salesforce using Faraday gem

ruby,ruby-on-rails-3,ruby-on-rails-4,gem,salesforce
Why we are getting this error when trying to make connection with Salesforce rest API through Faraday gem using ROR? Faraday::Error::ConnectionFailed: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ...

Using one instance of client for external service throughout rails application

ruby-on-rails,ruby,ruby-on-rails-4,salesforce
This question isn't about a specific external service, but about using the same object throughout an application to prevent re-authentication at every call. I'm building a ruby on rails application that connects to the Salesforce REST API via restforce. As of right now, I create an instance of the restforce...

SOQL query to get member data of members in a specific case team

salesforce,apex,soql
I want to get the Member information for the members of a Case Team. Is there anyway to do this without making multiple queries? It doesn't look like this data is associated with the record in the table CaseTeamMember. ...

Creating a list in Apex

list,loops,iterator,salesforce,apex-code
I have made this list and its suppose to return all the users that are active but I dotn know why the for loop is wrong. do I need a Set? public with sharing class ActiveAgents { public ActiveAgents() { User U = new User(); List<User> ActiveUser = [SELECT Name...

Two bundles use the same event listener

php,symfony2,file-upload,salesforce
In my Symfony2 project, I have two bundles: UploadBundle, which registers the uploaded file into a Database; and * UploadSfdcBundle, which registers the upoaded file in SalesForce I am using oneup/uploader-bundle to upload the files. I configured the event listener for each Bundle like this: For uploadBundle: services.yml: services: envivio_upload.upload_listener:...

HttpWebRequest.GetResponse Timeout issue when running from scheduled task on a server

vb.net,salesforce,httpwebrequest,scheduled-tasks
Currently i have a .NET application the logs into SalesForce using their API. From here I query an object to pull report information and build a URL that will export me a file. The code is as such. Dim request As HttpWebRequest Dim response As HttpWebResponse Dim stream as Stream...

Beatbox: Possible to add condition to query when pulling SFDC data?

python,pandas,salesforce,beatbox
In Pandas, I want to pull Opportunity data with CreatedDate >= 1/1/2015. Currently, I am extracting all Opportunity data before filtering for CreatedDate. Is it possible to optimize this process by adding the CreatedDate condition to the query? Current State: query_result = service.query("SELECT ID, CreatedDate FROM Opportunity") records = query_result['records']...

Using SOQL to query Identities using LIKE statement/keyword

salesforce,apex,soql
HI I was wondering If we could use SOQL statements using LIKE on Identities like: select Id,Name from Account where Id not LIKE '001W%' limit 10 So if there were ID strings that start with those 4 characters I can skip those and get 10 that are different. I tried...

How to escape Salesforce search query

ruby-on-rails,ruby,ruby-on-rails-3,salesforce
I'm using the Salesforce ruby gem to do the following @client.search("FIND {#{@email}}") @email returns the user's email address. During testing, I had an email address like [email protected] and this caused a MALFORMED_SEARCH error. I tried calling to_json on the email, but that didn't fix it. What kind of escaping should...

How to Stringify a sObject

salesforce,apex
I have a list of sObjects and I'd like to convert all the sObject fields to a string. For instance (this is the print out from a SOQL query), Custom_sobj__c{ "serId": 5, "value": { "Id": "a0FJ0000005zIbwMAE", "Contact__r": { "serId": 6, "value": { "Name": "Bob Bobenson", "Owner": { "serRefId": 4 },...

Python Beatbox to Salesforce Error Connecting to Salesforce

python-2.7,salesforce,beatbox
I just had my computer re-imaged and have Python 2.7.9 (64-bit) installed on my machine. Using PIP I have beatbox 32.1 installed. When I make the call to connect to Salesforce: sf_client.login(sf_username, sf_password) logging.info('Connected successfully') I receive an error message. I have tried just the normal login credentials which has...

Using Arraylist in Mule to query Salesforce

java,salesforce,mule,esb
We are trying to query Salesforce with an ArrayList in the where statement. Below is is the error we ran into when we tried using the ArrayList in the where clause. Query we used against Salesforce: Select Id,Billing_Number__c from Call_Log__c where Id in #[flowVars.successlist] successlist contains the values ['a1o90000001msXwAAI', 'a1o90000001msXxAAI']....

How to create new lead in Salesforce using ASP.net

c#,asp.net,asp.net-web-api,salesforce,visualforce
I want to create lead, View lead, Update lead of SalesForce using ASP.net C#. I have read many many blogs and confused. I am confused between development.salesforce.com, Force.com, APEX, Visual Force. Using which app i can integrate API for Pull/Push lead in salceforce. Thanks....

How to create class in salesforce using developer console

salesforce
I am getting Apex class does not exist error but i am not getting any option to create a class. Please see following screen shots. ...

Biztalk 2010 : Not able to Query SalesForece through Enterprise WSDL.Illegal Header issue

wsdl,salesforce,integration,biztalk
I am implementing BizTalk 2010 Saleforce integration where I am purely using enterprise wsdl for calling its methods. No C# code for any operation. I am successfully able to call login method and getting result back with all details. Now at the subsequent request where I am calling query method...

REQUIRED_FIELD_MISSING when trying to access the Salesforce API with beatbox

python,api,salesforce,beatbox
I am using beatbox to access the SOAP API of Salesforce. More specifically, I am trying to convert a Lead using convertLead like so # Assuming soap_client is a PythonClient already logged in and # lead is a Lead object. response = soap_client.convertLead({ 'leadId': lead.pk, 'convertedStatus': "Qualified - converted", })...

Salesforce Native IOS SDK can't refresh access token

ios,salesforce,salesforce-ios-sdk
I am currently using the Salesforce.com IOS SDK Version 3.0 to build a native application that connects to salesforce. This app will be used for external users, so it is pointed at communities. I first started by creating a Native IOS SDK app and getting that working and talking to...

Angular JS unable to display a field when the result is retrieved from salesforce

javascript,angularjs,salesforce,visualforce
I have used AngularJS while developing a visual force page and was trying to create a record under a custom object, I could see that the Salesforce controller is returning the ID to javascript callback function and am using $scope.lblMsg={value:result['message']} inside the success condition but I was unable to populate...

Salesforce custom button returning 'Unexpected Token ILLEGAL?

javascript,unicode,salesforce
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")} /*Getting the Running User Details*/ var result = sforce.connection.query( "SELECT Advisor__c " + "FROM User " + "WHERE Id = '{!$User.Id}'" ); /*Grab the Records returned by executing the above SOQL Query*/ var userDetails = result.getArray("records")[0]; /*Initializing the Contact record for Update*/ var contactToUpdate = new sforce.SObject("Contact"); contactToUpdate.Id =...

mule db2 sfdc account data loading

salesforce,mule
My Java code is: public class Db2sfdc { public Map<String, Object> getPayloadData(@Payload String src){ HashMap<String, Object> sfdcFields = new HashMap<String, Object>(); Map<String, Object> payloadMap = new HashMap<String, Object>(); List<Map<String, Object>> objects = new ArrayList<Map<String,Object>>(); sfdcFields.put("Client_Alert_Description__c", "Mule interation"); sfdcFields.put("Client_Status_Reason__c","POC update"); sfdcFields.put("Credit_Terms__c", "POC Terms");...

how to fire a salesforce trigger only if we update a custom field

triggers,salesforce,field,updates
Is there way to create trigger on salesforce custom object that will be fired only if we update one custom field and not every time we update the whole object

Deserializing JToken content to an Object

c#,json,salesforce,json.net,asp.net-web-api2
I want to deserialize JToken content to an object (User). How am I able to do this? Here is my json string: string json = @"[{""UserId"":0,""Username"":""jj.stranger"",""FirstName"":""JJ"",""LastName"":""stranger""}]"; This being sent to an api parameter as JToken. User class: public class user { public int UserId {get; set;} public string Username {get;...

Salesforce Apex: List.add( value || 'default value')?

list,salesforce,subquery,apex,soql
After querying for Account sObjects, I'm adding all the fields into a List. The problem is that some Account sObjects have certain fields and others do not. While adding the fields to my list, I'd like to be able to add field if it exists OR add a default string....

List Comprehension for Ordered Nested Dictionary to Python List

python,python-2.7,salesforce,list-comprehension,soql
I'm querying Salesforce via the python package, Simple_Salesforce. The results are returned as an OrderdDict. I would like to convert the records to a simple list of lists (although in the sample there is only 1 record). This is very easy to do, except in this example, the field Approval_Date__c...

How to set new session id after getting access token in OAuth 2.0

oauth,salesforce,access-token
I am developing an app for salesforce. For authentication I am using the web server flow. In salesforce OAuth implementation the session id is the same as access token. When I get the new access token (through refresh token method), what's the proper method to pass it to the client....

Salesforce: SOQL to query Master that has at least X amount of details associated

salesforce,relational-database,soql
I'm trying to set up a query that will return which contacts have over 5 deals with us. We have a custom sObject which is (terribly) named, contacts_deals__c which serves as an intermediary table between contact and deals__c. Contact is the master sObject, Contacts_Deals__c is the detail. Return all Contacts...

List button in Salesforce1

salesforce,salesforce-ios-sdk
In Salesforce1, Is there an option to add custom List button? For example, follow below steps and you will land to Opportunity tab in Salesforce1 and I want to see button at the bottom(refer screenshot). Step 1 : Login to Salesforce1 using any dev sanbox Step 2 : Tap on...

anchor tag not working in Desktop or Salesforce1

google-maps,salesforce,visualforce
I am displaying marker for every near by account and below anchor tag should navigate to the respective account upon clicking it.I have used the code in Workbook,but it works neither in Desktop nor in Salesforce1.I have checked posts where users reported that redirection is happening to wrong page.But in...

docusign update parent field on complete

salesforce,docusignapi,apex
I am new to docusign integration with salesforce. I am following a simple flow of User logs into sfdc User goes to an object A and clicks the custom button (exactly same one as in documentation) selects a template and sends to user X. The receiver X will sign and...

Salesforce Web to Lead Form text area field not submitting

salesforce
I have a salesforce web to lead form. Everything seems to be going through to salesforce except the comments textarea box. Any idea why just this field wouldn't work? The code for the texarea field (there is an actual number in id and name)   <form class="sf-form" id="contact-1" action="https://www.salesforce.com/servlet/servlet.WebToLead? encoding=UTF-8" method="POST">...

How to securely let a Salesforce user automatically log into my site

authentication,salesforce
I have a SaaS which integrates with SalesForce. I have synced all the SF users to my database so that my local users have a SF user ID stored. I need to have a custom link in SF which will bring the user to my site and log them in...

delete multiple objects which are inside array in Apex

salesforce,apex
Very new to Apex and never touched java, basically what I am trying to do is delete all records then insert records inside multiple custom objects. Bellow is my code for just the deleting part but I have no idea how to get this working. Once I know how to...

How to get the field label names for the Selected Object objects instead of Field API Names in Visualfroce page?

salesforce,visualforce,apex
public class Testing4 { public Map <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); public String selectedObject {get; set;} public String selectedField {get; set;} Public Testing4() { selectedObject = 'account'; } public List<SelectOption> getObjectNames() { List<SelectOption> objNames = new List<SelectOption>(); List<String> entities = new List<String>(schemaMap.keySet()); entities.sort(); for(String name : entities) { objNames.add(new SelectOption(name,name));...

XPath Query for Google Docs ImportXML

xpath,salesforce
I'm trying to pull a series of notes out of salesforce, I really just need the body of those notes and I'd really rather avoid copying those manually. I've got the URLs of the notes into a Google Docs spreadsheet and I'm trying to use ImportXML function to pull specific...

Simplest way to login to Salesfoce API? Oauth?

oauth,salesforce
Forgive the complete newbie questions. I'm very new to the Salesforce API. I'm attempting to connect to one specific account where I have the login/password info. This app will not be for public use. I've done a lot of research and it seems I do not need Oauth 2.0 and...

How to call an apex class from an extern button?

javascript,php,salesforce,apex
Is it possible to call an apex class from a NOT visualForce page? Just a normal webpage where you have a button and in this could be some .js trigger which calls the class in salesForce, or maybe through php?

getting file from sfdc with mule

salesforce,mule
I need to get file from sfdc and send it to ftp server. I am using mulesoft to connect sfdc. I have seen below docs in sfdc, but this is like getting content and do mapping and convert to file. Instead of this, I need to get file directly from...