Questions tagged [php]

PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language.

Filter by
Sorted by
Tagged with
12
votes
4answers
20k views

Accessing a Salesforce sandbox through API

can someone with salesforce API integration help me understand the requirements to access a client's Sandbox? I need to access the sandbox and pull data into our MySQL server. I hired a programmer ...
9
votes
2answers
3k views

Are workflows also triggered through the API?

Does anyone know if workflows are triggered by calls from the API? I have a workflow that is triggered by updating an opportunity. It then sends an outbound message to an external page that updates ...
8
votes
1answer
2k views

How to properly allow non-user/client login for external apps with the REST API?

So, I've been given the task of writing a web application for constructing and submitting quotes for my company. First off, I'm brand new to SalesForce, and I'm understanding it better and better ...
7
votes
1answer
492 views

Dynamic html mail process through single list

I want to sent a mail through single list every week.html mail and text mail both. It is possible to create one list like "12548" and add the different user like "abc@gmail.com","xys@yahoo.com", .... ...
6
votes
1answer
511 views

Salesforce - business logic - best practices

I would be really grateful if anybody could help me clarify, where to deploy business logic. I'm aware of the following possibilities: Write the main parts of the business logic in Apex Apex ...
6
votes
2answers
922 views

Issue when creating a new Recurring Donation through Salesforce API

Recently I have hit an error as described below: Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY Message: npe03.RecurringDonations: execution of AfterInsert caused by: System.NullPointerException: ...
6
votes
1answer
454 views

Force.com Toolkit for PHP - Still Officially Supported?

Looking at the current websites here: https://developer.salesforce.com/page/PHP_Toolkit https://github.com/developerforce/Force.com-Toolkit-for-PHP I wonder if the toolkit is still supported? Seems ...
6
votes
1answer
3k views

REST API: “INVALID_SESSION_ID” with valid token

I'm having some trouble accessing API endpoints using a valid token that I just got from the OAuth process. I'm passing data as I think I should and am trying to access any endpoint at this point (...
5
votes
1answer
322 views

PHP ExactTarget API returns Empty Response when trying to connect

I'm just trying to do the basic connection to the service, but I'm getting the following message on the page: Unable to load the webpage because the server sent no data. Error code: ...
5
votes
1answer
179 views

Query Result: Where does “any” come from?

I created a simple custom object in salesforce. There are 3 Extra fields: id, email, name (API Names: id__c, email__c, name__c) I dumped 100 rows of random Mockup data into that object (some fields ...
5
votes
1answer
668 views

Salesforce SSO and SimpleSAMLphp - not redirecting to startURL on logon

I am using SimpleSAMLphp as an Idp and Salesforce as the Sp. I have it working so that I can go to the Salesforce login page and use the additional button to logon using SSO, as per step 1 in this ...
5
votes
1answer
518 views

Echoing the Counts of each record through PHP using SOQL and GROUP BY [closed]

To start, this is the query: $query = "SELECT LeadSource, COUNT(id) Total FROM Lead WHERE CreatedDate > 2013-08-26T00:00:00Z AND CreatedDate < 2013-08-...
4
votes
3answers
2k views

Limitation on SOAP API calls in Enterprise edition of SFDC

I am building an integration between my company's Drupal CMS and our SFDC CRM. I will be using the SFDC SOAP API to accomplish this. The idea is to do a query via the soap API every time a user ...
4
votes
1answer
991 views

Handle JSON array from REST call

I'm trying to do my first REST integration between PHP and Salesforce, and am having some trouble understanding how to handle the JSON objects. Basically I'm sending over a list/array of objects in ...
4
votes
2answers
7k views

What is the maximum number of records I can send per RESTful API call?

There is a maximum batch size for the number of records returned by an API call. Most of the documentation for the API calls reference including a .json file, and some, like the Update a Record page,...
4
votes
2answers
465 views

Pushing data from salesforce org to PHP server

Is it possible to publish data from one salesforce to PHP apart from using outbound messages(as it cant send the attachments). I have a requirement where the website built on PHP has to be updated ...
4
votes
1answer
374 views

Can't create new contact via API

I am using the ExactTarget REST API. I am able to get my access token successfully via OAuth and can make some GET requests (i.e. https://www.exacttargetapis.com/contacts/v1/schema) that return the ...
4
votes
2answers
2k views

Decrypt a string encrypted by the EncryptSymmetric() AMPscript function using PHP

I read elsewhere in StackExchange that it's not possible to decrypt AES strings originating from AMPScript in PHP. Is this true? It seems that it should be possible with mcrypt. Also, part two for ...
4
votes
2answers
130 views

Web App Authentication

I'm working on a simple PHP web app to pull some data from our Salesforce to an external database for use in a website. I am a novice with a lot of stuff here but my primary question is regarding ...
4
votes
1answer
764 views

Returning Oauth token with REST API via PHP arrays when trying to send new contacts

In the salesforce REST API documentation, it tells how the system can give Oauth Tokens (https://code.exacttarget.com/apis-sdks/rest-api/v1/auth/requestToken.html ) But I don't seen any documentation ...
3
votes
2answers
4k views

GROUP BY custom field

I'm doing this query: SELECT ID, Name, Email_Domain__c FROM Contact GROUP BY Email_Domain__c And I'm getting this error MALFORMED_QUERY: GROUP BY Email_Domain__c ^ ERROR ...
3
votes
1answer
6k views

(400) - Bad Request when requesting auth token using Wordpress

We're using some house-built wordpress plugins to create emails in SFMC from wordpress content. The original plugin used the Fuel SDK, which from what I can tell, does not support remote sending, only ...
3
votes
1answer
1k views

Get more than 2000 with SOAP and PHP

I'm trying to return more than 2000 records, I haven't seen any answers for people using PHP and SOAP. Any recommendations? My query is simply: SELECT ID, Name FROM Contact Thanks!...
3
votes
2answers
401 views

session id or oath token, they not interchangeable?

Very new to Salesforce development. I used a connect app to get Oauth security token in a plugin. I am trying to call an Adobe Salesforce web service that needs a session ID. When I run my plugin I ...
3
votes
2answers
683 views

Adding new values to Custom Picklist (PHP Toolkit)

I'm using the PHP Toolkit for integrating a web application with my Salesforce account. I have this custom object: Individual__Choice__c that contains this custom Picklist: Primary_Option__c This ...
3
votes
2answers
171 views

PHP Salesforce Toolkit Parameterized Queries/ SQL Injection Prevention

Using the Salesforce PHP Toolkit how can we safely execute queries? It doesn't seem like parameterized queries are supported. The only function I've seen is query() and that only takes in an SOQL with ...
3
votes
1answer
2k views

invalid security token

Hi we were given an ExactTarget php application to port from an older Magento installation to a new Magento installation. This code is based on the ExactTargetSoapClient, soap-wsse.php and xmlseclibs....
3
votes
2answers
655 views

Salesforce REST API with PHP, INVALID_SESSION_ID after successful authentication

I connected my web app to salesforce and successfully followed all the steps in the web server OAuth flow to get an access_token and related info: https://developer.salesforce.com/docs/atlas.en-us....
3
votes
1answer
2k views

Salesforce REST API example, error: failed with status 400

I am going through this example of REST web service to salesforce from PHP app, and I was getting the same errors described here. I tried to implement more permanent solution with curl_setopt($curl,...
3
votes
1answer
2k views

Is it possible to create parent and child records in single Salesforce create call of PHP toolkit?

In the official documentation there are examples of how to do it in Java and C# but there are no examples of how to do it in PHP using Salesforce PHP Toolkit: See paragraph "create() and Foreign Keys"...
3
votes
1answer
704 views

Setting a checkbox value via SOAP API

I'm trying to update a Checkbox field via the SOAP API (PHP) and I keep getting the error, "The content of elements must consist of well-formed character data or markup." $obj = new SObject(); $obj-&...
3
votes
1answer
418 views

API PHP Partner WSDL REQUIRED_FIELDS_MISSING

I am having an issue with the Partner WSDL. When attempting to create a new opportunity over the API I am getting a return stating that required fields are missing. These fields are correctly being ...
3
votes
1answer
1k views

ExactTarget REST API - Getting issues with /contacts/ and /campaigns/

I'm new with ExactTarget APIs, I'm using Php curl to request the ExactTarget REST API. Basically, I tried to create a contact: $array = array( 'contactKey' => 'test@test.fr', 'contactId' ...
3
votes
1answer
709 views

Trying to set up Fuel API on Drupal and getting Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'ExactTargetWSDL.xml'

I am trying to get the Fuel API working on a drupal module that I made, I am using Drupal 7 and I downloaded the FuelSDK-PHP-Dot9 to my module that I want to use it on. I followed the configuration ...
3
votes
2answers
25k views

How to request rest api after getting access token. php & curl

I am able to authenticate with salesforce and receive a token using php & curl, below. However my next step is to use the token id to query salesforce (e.g objects) and i am not getting anything ...
3
votes
2answers
4k views

Sending data from PHP to Salesforce using CURL

I have to send the data from PHP to Salesforce and save the data in Salesforce. I have tried with the following code: $curlurl = "https://www.mysalesforce.com/services/apexrest/Contact?email={$...
3
votes
1answer
159 views

Link CaseComment to a Contact

I need to insert cases in salesforce from an external site. I'm using the Force.com_Toolkit_for_PHP: http://wiki.developerforce.com/index.php/Getting_Started_with_the_Force.com_Toolkit_for_PHP I can ...
3
votes
0answers
612 views

BULK Api - Invalid Session ID for Valid oAuth2 Token

Hi I am building Salesforce app which authenticate users using oAuth2. When user complete authentication I am receiving access_token. When I use this token with REST API it works perfectly fine. When ...
3
votes
3answers
724 views

How to parse the returned value of a query using a GROUP BY and Force.com-Toolkit-for-PHP

I'm selecting custom fields from an object and using GROUP BY to return those fields without repeating them. Something like this: SELECT Produto__r.Name, Produto__r.Id, ...
3
votes
1answer
284 views

how to change email list status for email address with REST API

i am running into an issue with the REST API. I am able to subscribe a user to any list when they are new to the system using ->post(), but when a user is already in our system and unsubscribed from a ...
3
votes
0answers
392 views

How to create, update and upsert leads with php toolkit using all or none header?

For Java, I found an example here, but I can't find any example using PHP Toolkit and I have any idea of how to do it. I have checked SforceBaseClient.php and the WSDL file. Inside WSDL file I've ...
2
votes
3answers
1k views

Fuel SDK + PHP + Sendable Data Extension

I cannot figure out how to make a Data Extension sendable using the PHP version of the Fuel SDK. The documentation describes both the SendableDataExtensionField and SendableSubscriberField as string ...
2
votes
1answer
134 views

How can I install GMagick on Heroku? [closed]

I get this error when trying to run my application: Heroku PHP Fatal error: Uncaught Error: Class 'Gmagick' not found in /app/lib.php How can I resolve this?
2
votes
2answers
876 views

Is it possible to call webservice methods using SOAP API?

I'm attempting to create a PHP app that access web service methods through SOAP API calls using the Force.com Toolkit. Currently this is working with REST calls, but as I clean up some things on this ...
2
votes
1answer
941 views

PHP API - Unable to query fields in custom objects

I'm trying to query for information using the PHP API (v20) and I am unable to query any custom object fields. The only one that appears to work is Id. It gives no error, in fact, the query itself ...
2
votes
2answers
7k views

Date format with Salesforce REST API

I'm retrieving the "LastModifiedDate" attribute of a File through a GET request with the Salesforce REST API but I just can't figure out the date format. Salesforce's documentation states the date ...
2
votes
1answer
624 views

PHP API Triggered Send

I am trying to create a triggered send using the API with PHP. The soap call is registering, however, i don't believe the function is registering correctly. I have a Triggered Send Definition ...
2
votes
2answers
3k views

Trigger Welcome Email after adding new subscriber via API?

I have a web form that adds subscribers to a list via the API but because i'm using the API rather than web collect it won't send out the welcome email. How would I send send the welcome email via api?...
2
votes
2answers
1k views

Create A Complex Filter Part using ExactTarget PHP API

I have created a function to handle a retrieve request using the ExactTarget API with PHP. The problem is that there's no documentation for using Complex Filter Parts in retrieve requests using the ...
2
votes
1answer
192 views

Salesforce API creating records AA2 appended to returned ID?

I'm using the Salesforce PHP Toolkit, when I create a record in a custom object the ID which is returned has AA2 appended to the end of the ID. Upserting Contact (existing) Array ( [0] => stdClass ...