• Admin SVD Admin SVD
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

Hello,

I am trying to upsert multiple objects using API REST call /services/data/v44.0/composite/sobjects (sObject Collection) refercing the objects to External Ids, but so far, I haven't had any luck.

I am doing something like:

{
    "allOrNone": false,
    "records": [
        {
            "attributes": {
                "type": "Account"
            },
            "MyExternalID__c": "27",
            "LastName": "test-test :( test-tes",
            "PersonEmail": "email@email.com"
        }
    ]
}
 

But I get al the time this error message:

[
    {
        "success": false,
        "errors": [
            {
                "statusCode": "MISSING_ARGUMENT",
                "message": "Id not specified in an update call",
                "fields": []
            }
        ]
    }
]

Any clue?

Thanks in advance!

Hello,

I am trying to upsert multiple objects using API REST call /services/data/v44.0/composite/sobjects (sObject Collection) refercing the objects to External Ids, but so far, I haven't had any luck.

I am doing something like:

{
    "allOrNone": false,
    "records": [
        {
            "attributes": {
                "type": "Account"
            },
            "MyExternalID__c": "27",
            "LastName": "test-test :( test-tes",
            "PersonEmail": "email@email.com"
        }
    ]
}
 

But I get al the time this error message:

[
    {
        "success": false,
        "errors": [
            {
                "statusCode": "MISSING_ARGUMENT",
                "message": "Id not specified in an update call",
                "fields": []
            }
        ]
    }
]

Any clue?

Thanks in advance!

Hello,

Recently, we have experienced several occurrences of REQUEST_LIMIT_EXEEDED - ConcurrentPerOrgLongTxn Limit exceeded.  We have multiple integrations using API's into Salesforce, as well as a large SF user base.  I'm struggling to understand how we can determine what the underlying cause is.  It would be helpful to know what transactions / requests are running long at the time of this error to narrow down our investigation.  According to SF, this error can occur when 10 concurrent requests are running, lasting more than 5 seconds each.

https://salesforce.stackexchange.com/questions/149335/first-error-unknown-exception-concurrentperorglongtxn-limit-exceeded

Along with this, I am curious what affect the Composite SObject Collections feature introduced in v42.0 would have on this.

https://developer.salesforce.com/docs/atlas.en-us.212.0.api_rest.meta/api_rest/resources_composite_sobjects_collections.htm

If we assume a single update on an object takes 1 second, and we use the composite SObject Collection feature to update 200 objects, is this considered 200 1-second transactions which will have no effect on the ConcurrentPerOrgLongTxn Limit, or is it considered 1 200-second transaction, which WOULD have an effect on the ConcurrentPerOrgLongTxn Limit.

Thanks,

Andrew Moore
 
Hello,

I have to perform a multiple upsert of the standard object Product using an external ID.
I found this https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm and this http://releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_api_rest.htm#sobject_tree_resource but it doesn't help me.
Here is my Java code :
 
try {
			HttpURLConnection sfdcConnection = (HttpURLConnection) new URL("https://cs61.salesforce.com/services/data/v39.0/sobjects/Product2/External_ID__c/1?_HttpMethod=PATCH").openConnection();
			
			sfdcConnection.setRequestMethod("POST");
			sfdcConnection.setDoOutput(true);
			sfdcConnection.setRequestProperty("Content-Type", "application/json");
			sfdcConnection.setRequestProperty("Accept", "application/json");
			sfdcConnection.setRequestProperty("Authorization", "Bearer token");
			
			DataOutputStream dts = new DataOutputStream(sfdcConnection.getOutputStream());
			dts.writeChars(JSONFile);
			
			BufferedReader br = new BufferedReader(new InputStreamReader(sfdcConnexion.getInputStream()));
			String result;
			if (sfdcConnection.getResponseCode() == 200) {
				while ((resultat = br.readLine()) != null) {
					System.out.println(resultat);
				}
			} else {
				System.out.println(sfdcConnection.getResponseCode());
			}
		} catch (Exception e) {
			System.out.println(e);
		}

Here is the JSON file :
{
	"records":[
		{"External_ID__c":"1","Name":"Product1"},
		{"External_ID__c":"2","Name":"Product2"}
	]
}

Thanks,
COFFIN Brandon