Skip to main content
11 votes
Accepted

Use cases for Enterprise WSDL vs Partner WSDL

A critical difference between the two is how change is handled i.e. what needs to be done when the org the WSDLs are generated from's structure changes - when new fields and objects being added. In ...
Keith C's user avatar
  • 136k
4 votes
Accepted

SOQL retrieve limited?

lead.setFirstName(sobj[j].getField("FirstName").toString()); The Lead FirstName field is not required. As such, it will return as null via the API if it is not defined. You will need to check if it ...
Daniel Ballinger's user avatar
3 votes
Accepted

INVALID_SESSION_ID when calling Salesforce services from Java

This is a pretty common problem. After you call the login method you get a LoginResult back in the response. That response includes the sessionId that you then need to include in the in the ...
Daniel Ballinger's user avatar
3 votes
Accepted

Which Summer '19 (v46) sObject types are returning field describe results of soapType "tns:json"?

Apparently, there is a bug on Salesforce API v45.0 which leaks the new type JSON designed for Salesforce API v46.0. This is observed on the APIEvent object on the RecordData field whose type is json. ...
dmachop's user avatar
  • 1,089
3 votes

Test Class for WSDL2Apex class generated by Salesforce Partner WSDL

I made a alternative version of WSDL2Apex that can also generate the test classes for coverage and the Mock. You can get it via the FuseIT SFDC Explorer for free (Disclaimer: This is from my current ...
Daniel Ballinger's user avatar
3 votes

Is there any reason behind Enterprise wsdl being recommended for Customers over partner wsdl

Personally, I've never used the Enterprise WSDL for anything other than quick one off integrations that aren't going to be around for very long. Why? While it's handy having the strongly typed ...
Daniel Ballinger's user avatar
3 votes

Is there any reason behind Enterprise wsdl being recommended for Customers over partner wsdl

This Knowledge Article might help you for understanding Why Enterprise WSDl is recommended for customers Differences Between Enterprise and partner WSDl
Josyula's user avatar
  • 659
3 votes
Accepted

Does partner wsdl change between sandbox

It can be used for any org. Using the Partner WSDL As a loosely typed representation of the Salesforce data model that works with name-value pairs of field names and values instead of specific data ...
Eric's user avatar
  • 54.2k
3 votes

Working With the Different Salesforce Api's

Short answer is Yes. There is a caveat - you do not login to SFDC using Tooling Api or Metadata APIs directly. You have to use Partner API to login and obtain "API endpoint" + "Session Id", and then ...
gaiser's user avatar
  • 1,370
3 votes
Accepted

Using Partner WSDL to update record in Salesforce

Partner WSDL is loosely coupled so you do not need to provide the WSDL again . However the third party code would still use string identifier for the field names that needs to be updated .So you ...
Mohith Shrivastava's user avatar
2 votes
Accepted

Security concerns about connecting to external systems

What you are currently doing is not secure, and in fact you have compromised any credentials shared this way. Passing the username and password to an external system is a bad practice, as is passing a ...
Robert Sussland's user avatar
2 votes

Working With the Different Salesforce Api's

If your java application implements an oauth flow then it is definitely possible . I would recommend you to explore oauth flow .For oauth you will create a connected app in your developer org . ...
Mohith Shrivastava's user avatar
2 votes
Accepted

Not able to generate Partner.jar

You are trying to generate partner.jar using WSDL file and you are using "force-wsc-36.1.1.jar" (File as Web Service Connector). As of WSC-36 connector required an additional framework to generate "...
Chintan's user avatar
  • 334
2 votes
Accepted

How to manage PartnerConnection instance?

You can not use the Session that this establishes indefinitely. At some point the Session ID that it contains will become invalid. This could be due to inactivity, or it could be due to the session ...
Daniel Ballinger's user avatar
2 votes

Is there any reason behind Enterprise wsdl being recommended for Customers over partner wsdl

The security will be the same. The general rule of thumb is if you are writing code for a specific org, then the Enterprise WSDL will be easier to use. This is because code generation tools will be ...
dana's user avatar
  • 1,167
2 votes

Tooling API : how to query on Salesforce Standard classes?

Not quite sure what’s your use case but with what you are looking for — But how to query standard classes such as "List", "System", "Database" etc...? You can never. These are platform ...
Jayant Das's user avatar
  • 30.6k
2 votes

Test Class for WSDL2Apex class generated by Salesforce Partner WSDL

You will have to use a Mock class. You can find the documentation about it here. You can write a mock method for each method included in your wsdl.
Martin Lezer's user avatar
  • 7,295
1 vote

partner.soap.sforce.com Http POST request

You don't send the SOAP POST requests to any of those URLs. They are XML namespaces - see Why are URLs in XML namespaces?. For the initial login() call you should use the endpoints defined in the docs:...
Daniel Ballinger's user avatar
1 vote

Connected App Partner API requests failing with INSUFFICIENT_ACCESS fault code for specific profiles

In this specific case it turned out the problem profiles had "IP Restrict Requests" enabled and our external web servers IP wasn't listed as trusted. What is odd is that the docs say the "IP Restrict ...
Daniel Ballinger's user avatar
1 vote
Accepted

SOAP API response queryresult to insert account records in salesforce

It isn't 100% clear what the question is, but it seems like the desired outcome with anything like this is to access the results from the SOQL query. All the results, with the exception of the ID ...
Daniel Ballinger's user avatar
1 vote
Accepted

Customer Community User login using Partner WSDL

I found the below solution which works for me. Solution: Clone customer community profile with restricted access (enabled API access) Create a new Customer community user with a new profile. ...
HowToDoItInSalesforce's user avatar
1 vote
Accepted

Partner API describeSObject on Contact fails with "Instance validation error: 'urn:address' is not a valid value for soapType."

So you are doing a describeSObjects for Contact and there is a problem with urn:address coming back in the response. Firstly, while you might be changing the WSDL for each API version, make sure that ...
Daniel Ballinger's user avatar
1 vote

Partner API describeSObject on Contact fails with "Instance validation error: 'urn:address' is not a valid value for soapType."

Create a new console app with the following code: using System; using System.Configuration; namespace SforcePartner { class Program { static void Main(string[] args) { ...
dana's user avatar
  • 1,167
1 vote
Accepted

Custom Login method to access custom SOAP Web services

Yes, you could write your own custom logic, but there's no reason to reinvent the wheel when it's in the existing documentation. It's a lot of work and not very "reusuable". Further, the Partner WSDL ...
crmprogdev's user avatar
1 vote
Accepted

Test Class for WSDL2Apex class generated by Salesforce Partner WSDL

Use mock callouts by either implementing an interface or using static resources. Mock callouts allow you to specify the response to return in the test instead of actually calling the web service.The ...
Pragati Jain's user avatar
  • 1,580
1 vote
Accepted

How to get current time of logged in Salesforce user using Salesforce API?

When you login to an org using the Partner WSDL and the SOAP API login() function, you can access the user's time zone using the resulting LoginResult object: login["result"]["userInfo"]["...
Grant Miller's user avatar
1 vote
Accepted

Updating child record from Parent using Web Service

You can write a webservice here, which can be called via SOAP. global with sharing class MyWebService { webservice static void updateChildren(Id parentId) { // do stuff } } You'...
Adrian Larson's user avatar
  • 151k
1 vote

Salesforce PHP API : INVALID_LOGIN

I cannot comment yet, so I am posting this as a separate answer. This code was working for me: require_once(SOAP_CLIENT_BASEDIR.'/SforcePartnerClient.php'); require_once(SOAP_CLIENT_BASEDIR.'/...
Jan Ehrhardt's user avatar
1 vote

Implementing sObject.get(String fieldname) when using the Partner API

I've taken what you've found and added a little more to suit my needs. This extension makes it a little more robust for more complex SOQL Queries. public static class SObjectExtension { public ...
anothermarcus's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible