Questions tagged [apexrest]
Apex REST enhances the Force.com REST API to allow developers to create custom REST-enabled web services using Apex.
606 questions
0 votes
0 answers
55 views
FSL.Exceptions.GeneralException: Schedule optimization incomplete
I'm receiving this error FSL.Exceptions.GeneralException: Schedule optimization incomplete. Contact your Salesforce admin and provide them with this error: HTTP: 408 when trying to execute the ...
0 votes
2 answers
65 views
Updating Twilio integration using TwilioSF
We have a Twilio integration for SMS built on the original unmanaged package, and I'm switching over to upgrade the associated APIs. I'm running into an issue where the current, functional callback ...
-2 votes
1 answer
176 views
Updating Account returns DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>
I have a function in an Apex Class which is called with an HTTP Post via a REST Api Apex class. One of the things it does is to update Account records (selected with a SOQL query in the failing method)...
1 vote
1 answer
429 views
I'm not able to select any reference action while creating agent action in agent builder
I have created a simple Apex REST to retrieve weather information. Here is my code. @RestResource(urlMapping='/weather/*') // Defines the REST endpoint URL global with sharing class SimpleNamedCred { ...
0 votes
1 answer
54 views
Issue with decimal parameter in apex while passing to commercestorepricing.PricingResponseItem
I am implementing custom pricing service. Salesforce has given documentation (PricingResponseItem) where they have mentioned how we can override salesforce pricing with custom one. I am using the ...
0 votes
1 answer
47 views
Insert failed. First exception on row 0; first error: DUPLICATES_DETECTED, Use one of these records?: [] [closed]
Facing this error on lead insert using api's. Not sure what I'm missing here. Insert failed. First exception on row 0; first error: DUPLICATES_DETECTED, Use one of these records?: [] @RestResource(...
0 votes
0 answers
84 views
Connected app OAuth2 and Named credentials used in salesforce rest callout to create/access record in same org only. But receiving 302 status?
We are trying to create product schedule using rest api and for Oauth2 Authentication ConnectedApp, Auth Provider, Named Credential. When we made callout using named cred it is showing 302 status and ...
1 vote
1 answer
302 views
Setting Up Named Credentials For Connecting Two Salesforce Instances i.e. Sandboxes
Hope everyone is well. I was wondering if someone could provide some guidance on how to setup Named Credentials to connect two sandboxes together for using REST OAuth to post data from Sandbox A ---&...
0 votes
0 answers
187 views
I am receiving Response Status Code: 500 {"status":"error", "message":"List has no rows for assignment to SObject"} for the below code
Calling a REST API apex class from apex trigger and seeing below errors. Response: System.HttpResponse[Status=Internal Server Error, StatusCode=500] Response Body: {"status":"error&...
1 vote
0 answers
2k views
System.CalloutException: The callout couldn't access the endpoint
I have created an Apex REST endpoint and I want to test it using an integration user that I've also just set up. The integration user is using the "Salesforce Integration" User License. I've ...
0 votes
0 answers
159 views
REST API call - cvent 401 error Code
I'm trying to write a CVENT REST API call in my code. According to the documentation, I'm sending all the required parameters. The same request works perfectly in Postman, but in my code, it returns a ...
0 votes
1 answer
213 views
How to decrypt an encrypted incoming webhook payload
I have set up a webhook in an external system to send data to my salesforce sandbox. My sandbox is getting the webhook payload but its encrypted. This is my Apex Class @RestResource(urlMapping='/...
1 vote
1 answer
329 views
How to Avoid Heap Size Error on response body
Daily orders loads records but some records are missing to load to fix this we have created another batch apex to call each day records and we are comparing with already exists benefitdisbursement ...
0 votes
1 answer
333 views
"message": "JSON request body must be an object at [line:1, column:2]","errorCode": "JSON_PARSER_ERROR"
I attempted to send an HTTP request and transmit a JSON to the Salesforce REST API in the following manner, but encountered the following error: Error: [ { "message": "JSON request body ...
0 votes
0 answers
148 views
Exposing existing methods via the REST API
Given a class with a large number of methods (200+) because it acts as a fascade for the putrposes of Visualforce remoting, how would these same methods be best exposed to the REST API? I'm thinking ...