Questions tagged [php-toolkit]

The PHP toolkit provides an easy way to make Force.com Web service API method calls from within PHP.

Filter by
Sorted by
Tagged with
0 votes
1 answer
866 views

Connecting to metadata API in SOAP with token in PHP

I try to call retrieve in SOAP using PHP but I need to login before. For login, I have a token that I get from "https://test.salesforce.com/services/oauth2/token" So, I try to pass this token in the ...
1 vote
1 answer
651 views

Adding to a Shared Data Extension

My company is trying to add to a shared data extension via FuelSDK in PHP and are running into some issues targeting the shared data extension. We've made sure that the following is set up: ...
1 vote
1 answer
253 views

Update field in salesforce - php sforce

I am trying to update a field in salesforce and for some reason it doesn't do anything. here is my code: class Salesforce { private static $mySforceConnection; private static $instance; ...
2 votes
3 answers
12k views

Class 'SoapClient' not found while running PHP script

I am integrating PHP with salesforce using SOAP, and use xampp server. It gives me error Class 'SoapClient' not found . after i remove ; before the extension=php_soap.dll and extension=php_openssl.dll ...
0 votes
1 answer
281 views

Get values of a picklist on a custom object via PHP SOAP Client

I'm writing a form on a website that submits data to the opportunities object of a SF install. This works but there are picklists in the opportunities object that ideally I want to be replicated ...
1 vote
2 answers
145 views

SQL relation PHP Toolkit

I have the following object (hed__Course_Enrollment__c), with a relation to the Contact object: For a given hed__Course_Enrollment__c Id, I want to show the first and last name of the contacts. If I ...
1 vote
1 answer
102 views

Required fields are missing: [TopicId]

I tried to insert data to salesforce but it returns Required fields are missing: [TopicId] Here is my code in inserting the data: $tObject = new Stdclass(); $tObject->EntityId = '...
-1 votes
1 answer
335 views

delete single record in salesforce by php

I have to delete a single record based on id but I got error bad id 2 Array ( [0] => stdClass Object ( [errors] => Array ( [0] => stdClass Object ( [message] => bad id 2 [statusCode] => ...
0 votes
1 answer
200 views

How to set the isPrimary role of a contact attached to an order?

I'm not sure why I'm having so much trouble with this. But I've never worked with the Salesforce API and from my understanding, this should be working, but it is not. I have looked at ...
0 votes
1 answer
44 views

Can't see new fields from PHP

We're running a SOQL query in a PHP/Laravel app, using php-toolkit. The query works fine, but we can't see new fields that we've added to our SF Org. The fields show up if we do a "Salesforce::...
0 votes
1 answer
222 views

Create a Case with SOAP in PHP - Failing to map across Contact ID

I have created a connection via SOAP with PHP and I am trying to create a new Case when the user submits the form. I have the SFDC Contact ID of the user and I am trying to insert the Contact Id into ...
0 votes
1 answer
56 views

Illegal character 0x0 when trying to delete more than 200 rows

I'm using salesforce's PHP SOAP client (SforceBaseClient) to attempt to delete records. It's working fine for less than 200 at a time, and I remember reading that you are limited to 200 rows at a ...
1 vote
1 answer
1k views

Salesforce callout to update external MySQL database

My desired end result for this project is when a lead record is converted to person account, an HTTP callout will be made to update and external MySQL database. My initial approach was to utilize ...
1 vote
2 answers
3k views

Fields missing from API request

I'm doing API requests via the PHP library (https://github.com/phpforce/soap-client), and I'm using the enterprise WSDL. Everything is working fine, but with one exception - some of the fields are ...
4 votes
1 answer
425 views

How to bypass duplicate rules with PHP toolkit

I got introduced to Salesforce just recently and needed to work with their API on a web lead form. I'm a PHP developer, so I'm using PHP toolkit (SOAP API) - some code samples here. I'm stuck with ...
0 votes
0 answers
73 views

Salesforce PHP API : Creating folder

I am getting error when trying to create a document folder in Salesforce using PHP toolkit. Below is the code that I used. $createFolderFields = array ('name' => $sf_folder_name, ...
0 votes
1 answer
39 views

Donated & Partially Paid problem

I am using PHP Toolkit 20 to integrate a donation form to Salesforce. Here is the code i'm using: /* * This function creates a Donation on Salesforce. Fires when Contact already exists on Salesforce. ...
0 votes
0 answers
221 views

PHP_Toolkit 20.0 Create Duplicate

I am using this example in order to create a new Contact on SF, my question is what happens if the Contact I am creating exists on Salesforce, how can I create that check or how can I tell Salesforce ...
1 vote
1 answer
93 views

PHP Toolkit Search Multiple Fields

Is it possible to search multiple fields? I am using the query: $search = 'FIND {'.$email.'} IN EMAIL FIELDS RETURNING CONTACT(ID)'; $response = $mySforceConnection->search($search); I would ...
0 votes
1 answer
127 views

PHP: Obtain the form "layout" of a custom object via API?

Edit: I may have answered my own question yay! I've just seen DescribeLayout and about to hit that endpoint to see what I get. I am currently using the PHP describeSObject() method to get a list of ...
1 vote
1 answer
822 views

PHP Soap API - Create Custom Object Record - No fields provided in an external foreign key reference in entity

Relatively new to working with the Salesforce API. Trying to create a new record for a custom object we have created in Salesforce. Below is the code I am using to create this custom object, I am ...
3 votes
2 answers
578 views

PHP Toolkit 20.0 (Enterprise) Upsert/Update Custom Object - deserializer not found

I'm using PHP Toolkit 20.0 (Enterprise) and the latest WSDL. Partner also fails for me. I can successfully create (using PHP Toolkit create) objects of this type. All my attempts to Update or Upsert ...
4 votes
2 answers
388 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 ...
0 votes
1 answer
313 views

Do I have enough data to create a salesforce php integration as a beginner?

I received a task as a part of a recruitment process although PHP and Salesforce developer experience was not specified as a requirement, but I want to try to finish it and learn something new. I ...
1 vote
1 answer
1k views

Can I Upload Remote PDF File to Account via PHP?

Been searching for awhile but haven't been able to find any examples.. I'm trying to upload a remote PDF file to an Account record in SF using PHP cURL / Json, is that possible and if so do you have a ...
1 vote
1 answer
166 views

can not query managed fields using soap API?

I am trying using SOAP API with phptoolkit. while trying to query all the order fields I only get standard fields, my order object contains some other fields create due installation of managed package....
0 votes
1 answer
74 views

How to implement transaction with php Toolkit

is it possible to implement transaction with php toolkit? I have to insert data into 2 objects. If there is any problem during the second insert, I would like to rollback the first insert.