As of May 31, 2023, we have updated our Code of Conduct.

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
0 votes
1 answer
122 views

APEX test script to web server with a static time stamp doget cakk and HttpGet

New to writing test scripts. Looking for help in error in Unexpected token 'Lead' for my test code. I have a static field that pulls off time stamp to only pull data after a certain time. I am ...
Khylin Edwards's user avatar
0 votes
1 answer
162 views

read JSON, POSTed to my visualforce Site page from 3rd party. without authentication

The currentPage().getParameters() can read GET pagams, and also reads POST body only if the header Content-Type = application/x-www-form-urlencoded However, when the Content-Type changes to ...
Dextersecret's user avatar
1 vote
1 answer
461 views

Future class error - First error: Argument cannot be null

I have a requirement where I need to send JWT token as a part of my request body. I have created a JWT class and an Apex rest class to acheive the required scenario. Below are the classes Apex Rest ...
Skumar's user avatar
  • 131
-2 votes
1 answer
2k views

Apex Trigger to callout Rest API to external system when the status is updated

I have a REST API class which will send the response to external system as { "AccountId" : "0098", "email" : "Email-ID", "status" : "active" } Below is the REST API class that will send data to ...
Skumar's user avatar
  • 131
2 votes
1 answer
8k views

How to pass @httppost parameters in apex integration?

I’m trying to integrate two salesforce orgs. How to pass httppost parameters of method from other salesforce org in apex code please find the below codes it tried but I am getting status 400 ...
saivinay manapuram's user avatar
2 votes
2 answers
591 views

WebService Post Rest API is Receiving as GET

I wrote a web service using @RestResource With both Get and Post methods. When I try to send a request via workbench - everything works great, but when I try to send a post request using other ...
Salvation's user avatar
  • 1,087
1 vote
1 answer
152 views

Unable to make /login POST call from application of marketing cloud

I'm working on building the application on the salesforce marketing cloud and facing the issue of making POST /login call to application. Scenario: We have created a cloud application in Installed ...
Sharat Patl's user avatar
0 votes
1 answer
300 views

Wrong format of JSON Array after a successful POST using Apex Class

I've been trying to create a List from the Account object, filtered by their record type, to be sent to our website using the Apex Class. I managed to create the query correctly and it returned the ...
Syarif Hamdi's user avatar
0 votes
2 answers
3k views

PATCH Issue - {"Message":"The requested resource does not support http method 'POST'."}

I have a callout that is having an issue with it's POST. I have seen a couple of work arounds for this issue but none of them seem to work with my integration. req.setMethod('POST'); req.setHeader('...
Olivia's user avatar
  • 3,369
1 vote
0 answers
2k views

POST API: System.HttpResponse[Status: Forbidden , StatusCode=403 ]

I am working callout to post my JSON. When I test my JSON at PostMan it's all correct but when same JSON with my api, I got ' System.HttpResponse[Status: Forbidden , StatusCode=403 ]' ( 403 Confirmed.....
Kartik.S's user avatar
0 votes
2 answers
2k views

Redirect following POST method

I have a scenario : A user needs to fill a form and after submitting, it should send the data of the form using POST API to some URL - the user will need to be redirected to this page after the ...
Salvation's user avatar
  • 1,087
0 votes
1 answer
85 views

Dispaly an Error Message on unsuccessful POST function

I have a requirement where the user is updating a table and when he/she clicks on the Save button a POST service is called and the data gets saved. The requirement is now enhanced where by the user ...
Rivu Indra's user avatar
0 votes
1 answer
55 views

Error in Json for Rest Api

I have a trigger that sends a certain opportunity to an unspecified stage, so I have a json with the objects, but I intend to send everything in a single string, so I joined json, when I run the code ...
Daniela Cerqueira's user avatar
0 votes
0 answers
52 views

POST service with Rest API callout method for HTTPS

I have a requirement for POST service. I am using the Rest API callout approach. The end point is in http. The client is asking for using https end point. My question is what is the procedure for ...
Rivu Indra's user avatar
2 votes
0 answers
725 views

HttpResponse Error 502 on callout to internal URL

Recently, I deployed a change set to my organization production environment. On production, it works fine, but on community my callout doesn't look to work as expected. Basically, on my code, I make a ...
gustavo.lei's user avatar
1 vote
1 answer
60 views

How to get our Salesforce org ready for APIs?

I need some guidance to understand how a certain API will work and the process of making it so. We have a third party online e-learning app (called bksb) where learners do assessments and we manually ...
Natasha Ali's user avatar
0 votes
1 answer
342 views

rest post execution of AfterInsert caused by: System.NullPointerException: Argument cannot be null

i am doing an callout to a third parity using a trigger. and I am getting the error. CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY message: LeadCallout: execution of AfterInsert caused by: System....
Herb Williams's user avatar
0 votes
2 answers
2k views

Json parsing in rest service apex

I want to know how Apex parse rest post data.. Like in the following example: // Apex code for Post service @HttpPost global static String doPost(String n,String site, String name) { Account ...
Akshit Gupta's user avatar
0 votes
1 answer
336 views

post Event for a lead getting incorrect type for WhatId

I am trying to post an Event for a lead in salesforce from an external system I am using the WhatId to link the event to the Lead and I am getting: MALFORMED_ID message: Related To ID: id value of ...
Herb Williams's user avatar
1 vote
1 answer
3k views

Test for HttpPost service: how to take JSON body for test?

I have a HttpPost methods. And I really don't know how to test it correctly. My methods: public static App__c ParseRequest(RestRequest req) { App__c app = new App__c(); String body = req....
MichaelLev19's user avatar
0 votes
1 answer
1k views

Callout REST HttpPost: how to create an object with all fields?

I wrote my Callout, but it create an object only with Id. How can I create an object with all fields? HttpPost: public static App__c ParseRequest(RestRequest req) { App__c app = new App__c(); ...
MichaelLev19's user avatar
0 votes
1 answer
63 views

Can we use a map in HttpPost to make our code shorter? (too many fields and we can add more in future)

Can we use a map? And how to do that? Too many fields here already and we can add more in future. @HttpPost global static Ticket__c postT(String title, String whattime, String whatdate, String ...
MichaelLev19's user avatar
0 votes
1 answer
38 views

How to to foresee External ID in HttpPost?

When we post a Box record we also send it an External Id from another side. How to to make it in HttpPost method? I have an object1 in Org1. In Org1 are all my callouts. object1 has a button POST. ...
user60684's user avatar
  • 143
2 votes
1 answer
1k views

How to send Form Data to DE without hitting submit button using AJAX and AMPscript

I have a HTML Form with AJAX code <html> <head></head> <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script> function ...
Ranjith Haridas's user avatar
1 vote
1 answer
598 views

API Header authorization for Bright Pattern

I have issue with posting an API header to Bright Pattern out of Developer Console using a workspace. below is the Code and when I send it I get an error: Execute Anonymous Error on line 6 column:...
Herb Williams's user avatar
2 votes
1 answer
81 views

POST a record from Org1 to Org2 with JSON and Map

I need to post created record from Org1 to Org2. I want to "put" my JSON into Map and just "open" Map in another Org. Needed result: fields from new Org1 Object's record = fields from new Org2 Object'...
MichaelLev19's user avatar
0 votes
1 answer
2k views

System.NullPointerException: null argument for JSONGenerator.writeStringField() in POST Method

I have a custom Obj, and try to realize a POST method. But I get an Error: System.NullPointerException: null argument for JSONGenerator.writeStringField() What is wrong here? public static ...
MichaelLev19's user avatar
0 votes
1 answer
272 views

Is it possible to create a Data Extension in a custom Activity?

I'm a beginner in marketing cloud and Journey Builder dev, so sorry if the question seems stupid but I'm struggling on a little problem, I would like to know if in a custom activity, running with ...
Otor's user avatar
  • 344
3 votes
2 answers
1k views

If we change the parameters used in webservice method in our org., will this cause error at end user consuming old WSDL?

Please enlighten me\correct me on following point: When we expose our class as SOAP Web service, End User consumes Enterprise/Partner WADL Class's generated WSDL and then post request to our ...
sfdcnoob's user avatar
1 vote
0 answers
2k views

Star Rating in Custom Lightning component

I was doing the trailhead lightning-restaurant-locator And the trailhead is showing how to use Get request so by looping through the response, name and views are in a list. Now I want to add star for ...
U. Ali's user avatar
  • 11
0 votes
1 answer
83 views

use the SObject Tree resource to create attachments and notes for opportunity VIA POST Ajax

How do I add notes and attachments to opportunity objects via SObject Tree. I am dong this via java script ajax POST "New Notes" "Attach File" "Opportunities": { "records": [{ "attributes": { "...
Metawaa's user avatar
  • 689
0 votes
1 answer
302 views

Posting AJAX to SObject Tree resource not working

been trying to have custom field in my opportunity . when the post happens I get the object in the right format however it doesnt post it, and doesnt really tell me the issue here is the object ...
Metawaa's user avatar
  • 689
1 vote
2 answers
555 views

POST Ajax method with Jquery to create new account contact and Opportunity

I am trying to create New Account, Then Contact and Opportunity that is assigned to that account . but use Post method, so have them all in one page. I dont wanna create any class, I know I can do ...
Metawaa's user avatar
  • 689
2 votes
1 answer
10k views

Not able to post data to Http with content type: application/x-www-form-urlencoded

I have tried with the below code but have received {"error":"invalid_request","error_description":"Missing parameters: password"} in response. I have tried with POSTMAN and getting correct response. ...
devforce's user avatar
  • 1,495
0 votes
1 answer
51 views

Creating REST Api with little control over request structure

I'm trying to expose a method to be accessed through HTTP Post. @RestResource(urlMapping='/exampleURL') global with sharing class Listener { //Object jsonObj = JSON.deserializeUntyped(...
NeurologicalApex's user avatar
2 votes
1 answer
10k views

RestResource Annotation - What is the urlMapping To?

I have never worked with Rest Resource classes before and am trying to debug one from a previous developer. I am looking at: @RestResource(urlMapping='/CompanyData/*') and am unsure what CompanyData ...
Olivia's user avatar
  • 3,369
0 votes
1 answer
32 views

Why POST is routed to GET?

I have rest controller with GET, DELETE and POST. GET and DELETE work ok. @RestResource(urlMapping='/test123') global class TestRest { @HttpGet global static String getOperation(){ ...
sawim's user avatar
  • 101
1 vote
3 answers
2k views

REST to create multiple objects-JSON Deserializaton failed on token null

I have been trying to create CurrencyType records from APEX and since that doesn't support DML, have been using the REST endpoint and POST method. Everything work fine with single record but with ...
SFDC Dev 27's user avatar
0 votes
1 answer
1k views

How to properly handle missing parameters in @HttpPost request body

Hey I'm writing a little integration to my app, and was looking for some good practices of handling exceptions when there is a blank or a missing parameter passed in request body, but couldn't find ...
Szymon Tosik's user avatar
3 votes
0 answers
494 views

Named Credentials not working with Twitter API [closed]

So I have set up a Named Credentials with information about my Twitter App. I know the authentication is working correctly becacause my named credential looks like this: And it says I am ...
Hans Donkersloot's user avatar
2 votes
2 answers
3k views

Why is this triggered send "Queued" in response, but never actually queued or sent?

It sounds like my issue is similar to this question. I'm currently POSTing (via Postman) to the following: https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:MY_CORRECT_KEY/send?...
Matthew Johnson's user avatar
7 votes
2 answers
5k views

Communicating between Lightning component and VF Page

I am trying to use lightningStylesheets="true" and communicate from my LC. This doc exactly shows the steps on how to communicate between LC --> VF: https://developer.salesforce.com/blogs/developer-...
Rao's user avatar
  • 16.6k
0 votes
1 answer
3k views

Calling a flow through REST api returns "http body is required" error

I'm trying to initiate a flow through the REST api using PHP: $url = "https://myInstance.salesforce.com/services/data/v40.0/actions/custom/flow/EndCourse_and_Semester_Notification"; $headers = array(...
RealGigex's user avatar
  • 175
0 votes
0 answers
36 views

Creating Web-to-Lead for more than two salesforce instance

I want to use one web-to-lead form to send data to my two salesforce instances at once. Meaning I need to use two URLs for POST action and two "oid" in the form. Is it possible and if it how can I ...
Anas Rashid's user avatar
0 votes
1 answer
1k views

Receive POST message body in VIsualforce controller

I realise that I can receive parameters in the query string via the following syntax: ApexPages.currentPage().getParameters().get('parameterName'); This also seems to work for parameters encoded in ...
berry120's user avatar
  • 701
1 vote
1 answer
50 views

on Post -System.CalloutException on one object but not on another

I'm building an application which sends a post request to an endpoint when a particular record is inserted. The trigger looks like this(for testing purposes): trigger NotifyPlayersOfShowCancelation ...
Hans Donkersloot's user avatar
3 votes
4 answers
19k views

Send Blob file via Apex Rest Callout

I'm trying to send a Blob Apex REST callout and it is keep failing. I tried all the examples in the web but didn't work. What is the standard and correct way to send Blob data via REST callouts? //...
MalindaL's user avatar
0 votes
1 answer
560 views

Web to case form fields pre-populated from another page

We have a Web to case form implemented in the force.com sites. This form has is being triggered from another VF page, with some parameters. One of the parameters holds the Id to another object from ...
Mahmood's user avatar
  • 5,792
0 votes
1 answer
613 views

Is there any way to do an ajax call to data extension from 3rd part site html page?

I have an input text box on a 3rd party site webpage and this webpage is simple HTML page. In the input textbox, I want to validate if entered number is valid or not. I can do this by jquery by ...
kuml's user avatar
  • 563
0 votes
0 answers
100 views

Pre-populate the "Post" global action to with text?

I am trying to pre-populate the Post (FeedItem.TextPost) global action with text. Anyone know a simple way to do this?
Sidereal's user avatar
  • 465