New answers tagged

0

Sending an email still counts as a DML for purposes of the callout limit. Also, you shouldn't send one email at a time, as there is a hard limit of 10 Messaging.sendEmail calls per transaction. @future(callout=true) public static void GetResponse(){ Messaging.SingleEmail[] emails = new Messaging.SingleEmail[0]; ... for(Integer i = 0; i < ...


3

Looks like the REST API version missed this important header at this point. There is an idea that you can upvote here So alternatives are Build your own apex class that does DML, this answer has some important details on how you can achieve this. Use SOAP API, sounds backward in 2020 to do this.


0

UPDATE: Unfortunately, there has to be a way for you to log in. Is seems unlikely that you will be able to achieve a reliable integration WITHOUT logging in. I guess you will need to talk to your client or make a call to middleware which has the credentials. Either way, you will need the credentials or atleast a way to authenticate. This is very well ...


2

Create a new Auth Provider (Setup > Identity > Auth. Providers) for Salesforce, then you can use Named Credentials. Use OAuth, and you won't need to worry about username/passwords, even if the admin changes their username or password; the session will be maintained for you. Only users with Author Apex could possibly write code to even use the Named ...


0

If you use Salesforce Inspector (Chrome Extension) https://chrome.google.com/webstore/detail/salesforce-inspector/aodjmnfhjibkcdimpodiifdjnnncaafh?hl=en or other tool that allows you to query using the Tooling API, you can just query: select id, SiteName, EndpointUrl from RemoteProxy If using Salesforce inspector, make sure "Use Tooling API?" ...


0

You can get the picklist values for a recordType by ui-api . you need to replace the url with /services/data/v48.0/ui-api/object-info/{objectAPIName}/picklist-values/{recordTypeID}


0

Sharing my result as I wasn't able to find much on this subject. I was able to get the information I needed with one metadata API call: metadata.read({ metadataType: 'CustomObject', fullNames: [ 'Event' ] }); this returned exactly what I was looking for, which was distinct picklist value sets for each record type.


0

At minimum, you need two describe calls no matter how you look at it. It's worth noting that your app should cache the results for performance reasons, since metadata rarely changes (see also the If-Modified-Since header). I would suggest /ui-api/record-api/{record-id} to get all the data and layout metadata, followed by /ui-api/object-info/{objectApiName}/...


-2

Your mobile number seems to be in the wrong format. It must conform to ISO-3306-1 alpha-2 standards (as per the sfdc link you've shared). See here for the example codes: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes


1

It appears it is possible by submitting: RecordType.Name: 'name string' and salesforce performs the appropriate lookup. The name happens to be unique in my case.


1

Well, in thinking further about the WHERE clause specifically causing the issue, I wondered if it was a spacing issue. I edited that line to remove spaces in the SELECT and WHERE: SELECT Id,FlowVersionId FROM FlowElementTestCoverage WHERE FlowVersionId=\'[myFlowVersionId]\' LIMIT 1' ...and it worked!


0

The details of how to request access to the REST API in Professional Edition orgs is found here: Accessing the REST API in Group and Professional Editions If you have not heard back on your partner support case requesting access, add a comment to your case and request a status update.


1

The JSON request body doesn't use a top-level jobInfo key. Rather than converting XML-based code, reference the JSON examples in the Bulk API Developer Guide: Example JSON request body { "operation" : "insert", "object" : "Account", "contentType" : "CSV" }


2

You are using the wrong HTTP method. If you perform an HTTP GET to /services/data/v48.0/sobjects/ContentVersion, you will obtain the response body shown. This is the sObject Basic Information endpoint. To create a record, you should be using POST.


0

I got the same error and what fixed it was choosing "Send client credentials in body" in the "Client Authentication" dropdown.


1

Use JSON.serialize to automatically format the body: request.setBody( JSON.serialize( new Map<String, Object> { 'PlacementId' => intCan.Name, 'CandidateId' => intCan.Id, 'OwnerId' => '000001', 'StartDate' => intCan.Training_Class_Start_Date__c, 'Status' => 'Internal',...


0

I contacted support but did not get any reply meanwhile i made (seeallData=true) and it worked


0

Below code working fine, Not sure what's different between the above and below code. String username = 'username'; String password = 'password'; string endpoint = 'https://api.sandbox.paypal.com/v1/oauth2/token'; string body = 'grant_type=client_credentials'; Blob headerValue = Blob.valueOf(username + ':' + password);...


1

Check this documentation, you can see the existing types in the sample code. I would try "Marketing" as the type. https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/creating_a_send_classification.htm


0

There's a chain of custody you have to follow when retrieving the public key: the iss (Issuer) of the id_token you're trying to verify determines the location of the keys. By default, the issuer will be login.salesforce.com for a production org but (for example) a community hosted in the same org will have a different issuer. If the id_token issued by SF ...


Top 50 recent answers are included