We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

0

Yes, the third-party would use https://domain.my.salesforce.com/services/apexrest/Cases/. To authenticate, they would use OAuth or the SOAP login() command, and set the Authorization header to Authorization: Bearer <session-id-or-access-token>. See the Web Server OAuth Flow, the User-Agent Flow, and SOAP login(). You can also use the Canvas API to log ...


1

You could just do: RestRequest req = RestContext.request; String requestBody = req.requestBody.toString(); Opportunity o = (Opportunity) JSON.deserialize(requestBody,Opportunity.class);


3

You are not casting the object returned by (Map)JSON.deserializeUntyped(requestBody). Change to the following: o.Appraisal_Date__c = Date.parse((String)oppMap.get('Appraisal_Date__c'));


1

As of v42.0 you can use Composite Collections to INSERT/UPDATE/DELETE up to 200 records at a time. These will be handled in a single execution context. You can also use Composite & Composite Batch to combine up to 25 "sub-requests" into a single API Call. However, each request get's its' own execution context.


0

You're sending the data as "binary", but the data itself is base-64 encoded (apparently). Try adding Content-Transfer-Encoding: base64 to the body's headers.


3

No, it won't save on the number of queries. The main point of the Bulk API for queries is it saves on the number of round-trips that you need, since the result is delivered as a single file at the end of the query result; this can save the number of API calls you need to use as a result. Normally, you're limited to 2,000 rows per API call, so 50,000 rows, ...


0

Found the issue: The Blank Page is because of same Transaction in which the Quote was created and the PDF was generated. Solution was to mark the Function as future(callout=true)


0

I tried with vNHttpFormBuilder class also but it was giving as "bad request:file content missing error" After some efforts,I concluded the request have to be key-value pair format. So I have tired below solution, it is working fine now, but the only issue is that I have to convert the content of vf page into string and send the data. PageReference ref = ...


4

The documentation should likely be your first stop when you have a question. If you take a look at Execute a SOQL Query from the REST API documentation, at the bottom, we see this Retrieving the Remaining SOQL Query Results If the initial query returns only part of the results, the end of the response will contain a field called nextRecordsUrl. For ...


0

One thing to try, looking at https://secure.na1.echosign.com/public/docs/restapi/v6#!/transientDocuments/createTransientDocument The parameter name is "File" not "file", HTTP parameters can be case sensitive. Try changing name="file" to name="File" in line 2.


0

Checkout https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_httpcalloutmock.htm to review how to do a mock callout. example: private class myMock implements HttpCalloutMock { public HTTPResponse respond(HTTPRequest req) { HTTPResponse res = new HTTPResponse(); res.setBody('<wREPLY ...


Top 50 recent answers are included