Questions tagged [post]

POST is a request method supported by the HTTP protocol used by the World Wide Web. It is often used when uploading a file or when submitting a completed web form.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
38 views

Receiving Error in Rest API

We are trying to send post request to salesforce form different system. But sometimes we get below errors While Authenticating [2022-09-26T12:05:28.935Z] "POST /services/oauth2/token HTTP/1.1&...
  • 19
0 votes
0 answers
12 views

Update picklist using json

I'm trying to update the values of various picklist as well as their dependencies. I'm receiving an xml with the info of the dependencies between my picklists. I'm trying to update the values and the ...
  • 1
0 votes
0 answers
56 views

Sending an image as a POST request

I am trying to make a POST request to Eventbrite API to send an image from Salesforce along with other parameters. Under the hood Eventbrite is using Amazon AWS S3 bucket. When I send the request ...
1 vote
0 answers
28 views

Chatter post with attachment not visible on record page ( Case Object)

On the Case object, when i try to post a message with attachment (with the Chatter feed component), the message doesnt appear but it's visible in the lightning page builder of the record (there are no ...
0 votes
0 answers
31 views

Send a post request after an update

I'm trying to send a post request after an update from a record, and then is going to generate a link for the post request, I had the idea to create the post request after an insert using a trigger ...
0 votes
1 answer
60 views

How to send the ID to new page after insert?

There are 2 pages. I inserted one record into an object with the save button on page 1 and transitioning to page 2, Now I want to get the ID on page 2, what should I do? ID was auto-numbered by object....
  • 9
0 votes
0 answers
19 views

How to add multiple entries (records) to a Custom Setting list with REST POST request [duplicate]

So I have created a custom setting of type list and I'm trying to fill it with multiple records using a POST request. I'm using workbench to try this and I've successfully posted 1 record. URI: /...
0 votes
0 answers
54 views

HTTP Method 'POST' not allowed

I'm getting two different errors in salesforce workbench when trying to do POST and PATCH. I'm trying to update a picklist using a json as request body. When we do POST, I get this error message: HTTP ...
  • 1
0 votes
1 answer
43 views

Generate JSON body from Visualforce page [duplicate]

So the objective is to create a visualforce page form that creates a JSON for HTTP post method. I was wondering what was the best way to go about this. '{"listingAction":"sale",&...
0 votes
1 answer
111 views

Rest API code 400 "message":"Callout loop not allowed" [duplicate]

I tried to call Salesforce Api /services/data/v54.0/actions/standard/createServiceReport in order to create a service report but I got this error : the status code returned was not expected: 400 Bad ...
0 votes
0 answers
42 views

How to create multiple ApexClassMembers with one call?

According to answer to my previous question, Tooling API objects are not supported in /composite calls. Is there a way to insert a large (let's say 2000) number of ApexClassMembers instead of ...
0 votes
1 answer
30 views

As a customer user, is it possible to delete own posts with comments in the community?

Is it possible to delete own posts with answers on below as a customer user in the community?
-1 votes
1 answer
140 views

System.TypeException: Invalid decimal in Rest Resource @HttpPost

I developed an Apex REST web service in Salesforce with the method 'POST' and i am trying to insert the string value in currency field of Product__c object, so when I try to hit the API im getting the ...
0 votes
1 answer
377 views

'System.NullPointerException: Attempt to de-reference a null object' error on test class for @RestResource @HttpPost

I developed an Apex REST web service in Salesforce with the method 'POST' This is my main class public class Product { public String pName; public String pRating; public List<Item> ...
2 votes
1 answer
187 views

CloudPage GET/POST Parameter with value "<[aZ]" fails with 500 error

I try to make sense out of an edge case scenario I just came across and would love to get some ideas around why this may happen. On any CloudPage, if I add a GET or POST parameter with the value of &...
  • 466
0 votes
0 answers
446 views

multipart/form-data Json Body with multiple files

how to send a json and a list of files in a POST request, in the implementation I made the files are not sent. Blob blobBody = CreateMultiPartFormDataBody(integracaoDadosEntrada.mapFormData, ...
0 votes
0 answers
336 views

How to pass parameters to VisualForce page with POST call from APEX

I have some custom data that I want to pass to a VisualForce page in order to render it as a PFD and then send it as an attachment via e-mail. This data is not stored in Salesforce. When trying to ...
0 votes
0 answers
25 views

How to get a hyperlink in the Post Body in Salesforce without using LInkURL? [duplicate]

As I am using this code to add a feeditem in the case. As it created a feeditem on the case but hyperLink is not working. In the documentation we got that isRichText supports the tag but in my ...
0 votes
1 answer
156 views

Rest post account record error "POST requires content-length"

So i am trying to insert some account record. Token is right because get command works well. Error while Post - POST requires content-length. I am even trying to add body with JSONGenerator. ...
-2 votes
1 answer
585 views

How to create JSON Generator with apex in post api [duplicate]

I'm new in Apex and we have a requirement, Need to send a record from Salesforce to an external system using Rest API whenever a record is created in Salesforce, I need to send a couple of SF fields ...
0 votes
1 answer
43 views

Sending Simple Apex Post Request

I have narrowed down why my apex post request is not sending to an external API. For some reason the JSON data that I serialize and send is wrong but everything works when I test it using Postman. ...
0 votes
0 answers
100 views

Attempt to de-reference a null object while serializing a custom object with nested objects to JSON in Apex

Im running into an de-reference a null object error while trying to serialize a list of objects into JSON for a POST method. The error occurs when it tries to assign a value to line 277 (within the ...
  • 13
0 votes
1 answer
222 views

Do a post callout and get the location header from rest service class

I have a requirement and I am not sure is it possible or not. My requirement is that I have a rest service class with @httpGet annotation where I am getting Id of a record after that I need to do rest ...
0 votes
1 answer
562 views

Unable to convert incoming JSON request body to string JSON - Salesforce

I am creating a post method that is tested with Postman and I do get the functionality done which is getting a variable from the incoming JSON string then querying a record, then updating the account ...
0 votes
1 answer
275 views

apex code to send a post request for given information

Im trying to write an apex code for a post request while using the below data this is basically for creating a room in chat tool curl -X PUT -H 'X-ChatWorkToken: Your API token' -d 'description=group+...
  • 57
0 votes
1 answer
53 views

JSON error while passing data from one environment to another rest api

I need to sync some account records between two environments of the salesforce. I'm able to make a callout but while passing data getting a JSON error. I'm basically serializing a list of accounts in ...
  • 321
0 votes
0 answers
992 views

Illegal character VCHAR in request Header

We have an external system that sends us POST Requests. The authentication method is using force.com public site with IP restriction. The external system sends a POST request and got an error and we ...
  • 963
0 votes
0 answers
64 views

Salesforce POST with both SObjects and ContentVersion [duplicate]

I'm trying to build functionality in Salesforce to allow a payload POST which would create multiple SObjects and ContentVersions (Images/PDFs mostly). I've built out a custom endpoint to handle the ...
  • 1,236
0 votes
1 answer
16 views

Unittest not covering webservice

I have a webservivce for which i wrote a unittest but there is no code coverage, what am I missing Webservice @RestResource(urlMapping='/DynamicApi/*') global with sharing class DynamicApi{ ...
  • 2,184
2 votes
1 answer
2k views

Help Understanding How to write Test Class for Apex HTTP Post

So I've been through quite a few posts/questions already looking for enough information to have this "click" for me, but I'm still missing something. This is my first time working with ...
  • 43
2 votes
1 answer
2k views

How to properly send a Json in the body of a POST request?

I'm trying to do the same I accomplish with postman but with Apex and I'm not being able to do so: I need to send a POST request to this example endpoint: https://cccccccccccccc/api_jsonrpc.php This ...
0 votes
1 answer
434 views

Multifunction POST method in apex REST API controller

I want to create a single POST method which takes method as a parameter along with the Request body. Using the parameter string method i'm trying to call the related method within my apex controller. ...
1 vote
1 answer
2k views

Pardot form handler submission via API

I have a Pardot form handler linked to a form on a company's webpage. I need to do a test submission via API. I am making a POST request to the form handler endpoint URL and I filled every field but I ...
  • 15
0 votes
1 answer
333 views

Retrieve Single Most Recent Article to have Topic Assigned in Topic Assignment Trigger SOQL Apex Salesforce

I'm creating an Apex Topic Assignment Trigger for our Community that simply does this: After insert of a new topic to a knowledge article, create a post that simply says "A new article called <...
0 votes
0 answers
133 views

POST Request via SSJS - Authorisation Types

I am working on sending an outbound POST request and haven't been able to send one to my end point url. I'm receiving a Status Code 500 indicating that this is an SSJS issue however, upon closer ...
2 votes
1 answer
85 views

Help with Rest Resource

I'm working with integrations rn, and I'm stuck... I need to create a public site to receive calls fired by a third-party system. I'm using this tutorial: http://www.wadewegner.com/2013/03/creating-...
  • 107
0 votes
1 answer
1k views

ApexRest HTTPPost - Testing using workbench

I have created an apex rest httppost class. This requires two parameters which are passed via response. I am trying to test this via workbench by passing two parameters. @RestResource(urlMapping='/...
1 vote
1 answer
1k views

Apex rest API with get and post in the same time [duplicate]

I have a scenario where I need to do a httpPost to save a value from the request parameter and then return some other fields for the same object fields using httpget. So, my parameter would be ...
0 votes
1 answer
84 views

Can I open page(NON-Visualforce) by POST method?

We want to open page(NON-Visualforce) by POST method. User open Visualforce page, and click 「submit」 button. This button call Apex class( or js? ) , other page open by POST method. Other page is ...
0 votes
1 answer
273 views

get the source domain from a post request

Third-party need to send Data to Salesforce using Https post request - They cant handle token access so it must be a force.com site. I referred an Apex class to the site (Without using VF page), by ...
  • 963
1 vote
1 answer
828 views

Using apex for posting multipart/form-data Content-Type - limit exceptions

I am using this: Salesforce Apex - POSTing multipart/form-data Content-Type thread to send a file to a 3rd party It works great (taken the EinsteinVision_HttpBodyPart class from here) But when ...
  • 4,849
0 votes
1 answer
432 views

How to Make Pardot Authorisation Request?

I have a training org where I'm making API callouts for authorise to the Pardot environement, but recieving the error :- Error Code :- 49 Error :- Access Denied, The details of the API url which I'm ...
0 votes
2 answers
665 views

Impossible to patch Account

Is there a configuration to allow patching in SalesForce ? I tried to patch the Account on Postman, no success. I also tried on Workbench, no success. My Url (on workbench): /services/data/v47.0/...
  • 21
0 votes
1 answer
656 views

JSON_PARSER_ERROR on POST in Workbench

I am using https://workbench.developerforce.com/restExplorer.php . Trying to add new patient, on URL /services/data/v46.0/sobjects/HealthCloudGA__EhrPatient__c, with POST method, with body like this : ...
0 votes
1 answer
36 views

Can't Consume POST request but Dev Console shows url is being hit with requests

Afternoon, We have a vendor that is trying to send POST requests to a method in we have hosted using Site Guest User. Here is our code snippet that we are using to see if the request is even ...
  • 1,318
2 votes
0 answers
103 views

How to map static date field in Async SOQL query job?

I'm trying to use Aggregate Async SOQL to Query Big Objects to a custom Object like below (https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/...
  • 1,095
0 votes
1 answer
1k views

Form post to external url through an aura component embedded in community page

Is it possible to execute a form post to an external site from an aura component that is exposed in a community page? Our aura component looks like this <aura:component implements="forceCommunity:...
1 vote
1 answer
2k views

Apex callout with a client certificate

I have written one Rest service which is returning a access token to resend it to endsystem to get the final response but we are getting "Request processing failed; nested exception is java.lang....
  • 37
0 votes
0 answers
973 views

System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable" ERROR

I'm trying to make an HTTP Request to other System. They provided the endpoint URL which contains a Port number. https://Test.com:50001/RESTAP/BGN/PRDV/CREATE When I'm trying to make the request I'...
  • 963
1 vote
1 answer
7k views

How to resolve Missing closing quote character ' on string, error message

I got the code below working: Corrected the (curved) brackets, 'quote signs'. Now at least anonymous execution window is executing without interruption. Even the 400 message, has gone away. Only need ...