New answers tagged

-1

Okay actually I found the error by myself :D Had to go to SetUp ==> Permission Sets ==> sfdc.chatbot... ==> Apex Classes ==> add the Function you want to call


0

You'll need to build two wrapper classes that look something like this: public class ChildWrapper { public ChildObj__c theChild { get; set; } public List<GrandchildObj__c> theGrandchildren { get; set; } public ChildWrapper() {} } public class ParentWrapper { public ParentObj__c theParent { get; set; } public List<ChildWrapper&...


0

Basically, you’ll want to review the many apis on Trailhead; many can solve similar problems, so compre them and use the right one for the job. There are other considerations that might guide which apis you use, more on those below: Choose where you'll deploy the app: The tools & Apis available to you depend on this. Pick “where” you deploy your app; ...


0

To request Excel instead of JSON format, change the Accept value in the request header to application/vnd.openxmlformats-officedocument.spreadsheetml.sheet. request.setHeader('Accept', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');


0

See David Cheng's comment above. So obvious - just add RecordTypeId into my select statements! compositeData = { "batchRequests": [{ "method": "GET", "url": f"/services/data/v50.0/query/?q=select+id,+RecordTypeId+from+Account+where+Auth0_User_ID__c='{auth_id}'" ...


0

The way you're calling it, you're putting data into the body. You need to use the Headers attribute instead. content = new FormUrlEncodedContent(new Dictionary<string, string> { // Whatever body elements you need goes here }); content.DefaultRequestHeaders.Authorization = "Bearer " + AuthToken; See also this question on Stack Overflow, which ...


2

Generally speaking, you have two options. The first option is to set up a server on localhost, and listen for a connection from the browser at the end of the flow. This is often something like https://localhost:1717/oauth/success. This is how the Salesforce DX CLI operates. The second option is to listen to a WebView or similar component for when you land on ...


1

Custom Metadata Types support various relationships. They can have multiple records created against them which would allow you to manage individual mappings. They even allow you to have effectively parent/child relationships. Combining this with Entity Definition and Field Definition type fields would allow you to create the sort of configuration you've ...


1

Use the FOR UPDATE SOQL keyword in Apex to require row locks for the leads you're querying. This ensures that the lead query matching by email will wait for any other in-flight records. This will ensure that you're not creating duplicates, even if the records are inserted simultaneously between two API calls. Lead[] existingLead = [SELECT Email FROM Lead ...


0

Marketing Cloud provides a Contact Delete Framework that will help here. This is available both via the UI and the API. Be sure to review the Best Practices. Note the comment at the bottom around Synchronized DEs: For Synchronized Data Sources, delete the information from the original data source in Sales Cloud, Service Cloud, or another cloud. This deletes ...


0

You can split the query that is failing (since you need to use PKChunking, I assume your query is failing with with "InternalServerError, retried more than 15 times") into smaller queries - e.g. split your data by CreatedDate, execute 1 bulk query for each date range.


1

David Reed's suggestion of switching from properties to member declarations is a good one. As the member declarations aren't considered something that requires code coverage you no longer need to test them. Another alternative is to use a representative sample JSON payload in a tool like JSON2Apex. This will generate a test method that ensures the sample ...


3

If you can upload in binary format, do so. If your source platform cannot use binary, then use base64. Base64-encoded data is approximately 33% larger, meaning longer upload times, more bandwidth used, and a lower maximum file size for non-multipart uploads. You can insert or update blob data using a non-multipart message, but you are limited to 50 MB of ...


0

/push/v1/messageContact/{message ID/send With this endpoint you can target a contact by Contact Key or Push Token.


2

It can. It depends on what exactly your Apex code is doing and how long each callout takes. Assuming each function makes exactly one callout, the primary governor limit to be concerned about is probably Maximum timeout for all callouts (HTTP requests or Web services calls) in a transaction: 120 seconds If you are not changing the default timeout of 10 ...


0

You can generate a bell notifications via Apex for a specific user(s); does this work for you? See https://salesforce.stackexchange.com/a/286556/10073 It calls the /services/data/{version}/actions/standard/customNotificationAction


0

Yes, you can use the composite request API. The URL for this is /services/data/v50.0/composite. Example Payload { "compositeRequest": [{ "method": "GET", "url": "/services/data/v50.0/query?q=select+id+from+account", "referenceId": "query1" }] } You can also use this to ...


1

You can have CustomerId as the subscriber key relation on the Orders DE. You can link this DE to the contact using Data Designer. On the journey use the below setting to send the email to the address on the 'Customer DE'.


1

I am developing an application in nodejs using salesforce api. Here I had this issue where I needed to create a field in salesforce with metadata and update filed-level security for profiles for that field. I found the solution from YodaDaCoda's answer. Thanks to him. using jsforce it is easy process. Here I share my code. profile update does not take more ...


0

Set the field history tracking and check how it is getting change. It will give you more understanding to get started with full debuing


0

We can't give you specific code, as you've not asked a specific question. In the most general sense, you will: Make the Callout Use HttpRequest, Http, and HttpResponse to build, send, and receive a response from the external service. Parse the Data You will then use the JSON class to parse your response, typically via deserialize or deserializeUntyped, ...


1

You need to ensure that the Lightning scheduler is configured in your org. If Scheduler is configured, you will no longer see 'Service not found at: /services/data/v46.0/scheduling/' and the URI /services/data/v46.0/scheduling/should return valid resource values as below: { "getAppointmentCandidates" : "/services/data/v46.0/scheduling/...


Top 50 recent answers are included