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
7
votes
2answers
2k 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-...
0
votes
1answer
609 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(...
0
votes
0answers
24 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 ...
0
votes
1answer
494 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 ...
1
vote
1answer
38 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 ...
1
vote
4answers
5k 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? //...
0
votes
1answer
164 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 ...
0
votes
2answers
3k views

Creating Custom Form and putting info into Data Extension

I would like to know if its possible to create a custom Form. For example, it will have 2 fields. Name and DOB. I can perform a validate via Javascript, but once onsubmit is true, I would like it to ...
0
votes
1answer
355 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 ...
0
votes
0answers
46 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?
0
votes
1answer
305 views

Salesforce REST JSON Nested Self-Related Objects?

ooks like I need some help here. Salesforce documentation and multiple google searches not gave me an answer. Problem description: I'm trying to insert (POST) nested self-related records using REST ...
0
votes
0answers
372 views

POST data to salesforce

I am trying to POST a JSON content to an apex URL. It always returns "Method not allowed" error. Here is the code HttpClient client = new HttpClient(); client.BaseAddress = new Uri("https://my....
1
vote
0answers
148 views

PHP Toolkit to SF API, Why am I getting a 402 error with “Unable to determine from which page the request originated”?

I am attempting to build a set of tools in PHP designed to "smoke text" various data transmissions to and from our Salesforce org, using PHP Toolkit 20.0. Here is my PHP: require_once('soapclient/...
0
votes
1answer
59 views

Serialized JSON for POST to server not taking

I am following this simple example List<Account> accounts = [SELECT id, name FROM Account LIMIT 2]; String accountsJSON = JSON.serializePretty(accounts); I am trying to replicate this exactly ...
0
votes
1answer
652 views

How to call an Apex WebService from an External System

I'm trying to build a webservice that will expose the ability to input data from an external system into salesforce. I've found multiple resources on making a webservice. I can't however find how to ...
1
vote
0answers
109 views

Regarding Postman

For Normal Postman Input i gave as Body like this for group of Accounts in postman uri https://domain name/services/data/v36.0/composite/tree/account/ using post method { "records" :[{ "...
0
votes
2answers
100 views

Make a web listener class publicly available [duplicate]

I am implementing a web listener class and want to listen to POST requests. @RestResource(urlMapping='/MyListener/*') global with sharing class ListnerClassTest { @HttpPost global static ...
1
vote
1answer
181 views

Bulk Records Using Rest Services - getting soql 101 error

Request Body represents the id and name of the records that should be updated. I am giving more than 100 Records in Request Body via Postman using a POST method. When I do so I get an error response: ...
1
vote
1answer
147 views

Post approval action on Knowledge articles

I have a business requirement as follows: When a knowledge article gets approved, the article title, subject and article link to be posted on chatter and will be available to specific group(s). I ...
0
votes
1answer
417 views

Rest Services using Apex via Postman

I am Giving the Request body in Postman like: {"eventitems": [{ "whatid":"0012800000i92pd", "whoid":"0032800000TirUN", "OwnerId":"005280000010olH", "IsAllDayEvent":true, "Subject":...
0
votes
1answer
39 views

Apex class in Rest Services

My code fails to compile with this error: Compile Error: Incompatible element type Event for collection of CreateEventClass1.eventitems at line 41 Here is my Request Body in Postman: { "...
0
votes
1answer
231 views

Apex in Rest Services

I am Giving the RequestBody in Postman like { "contact":[ { "name":"ravtrtr", "phone":"4333", "accountid":"0012800000iJfGi" }, { "name"...
1
vote
1answer
82 views

Rest Services using Apex

I am Writing the Code Like else if (text == 'Invitees') { Invitees = new List < String > (); while (parser.nextToken() != JSONToken.END_ARRAY) { Invitees.add(new string(parser));...
0
votes
1answer
91 views

Rest Services using Apex class

**I am Accessing the Class using postMan I am Writing the Code like @RestResource(urlMapping='/create Event2/') global class JSON2Apex { @Httppost global static void consumeObject(JSONParser ...
-1
votes
1answer
498 views

How to Write a apex class to get the json input Values from postman

In PostMan the Request Body look Like this : {"eventitems":[{ "whatid":"0012800000i92pd", "whoid":"0032800000TirUN", "OwnerId":"005280000010olH", "IsAllDayEvent":true, "Subject":"...
0
votes
2answers
45k views

How to give date and time values in request body using postman

I have Created a Request Body in Event Object with Date and Time Details, how to give the Date and Time Values in JSON format using Postman { "Type":"contact call", "WhoId":"0038E00000GWXhL",...
3
votes
1answer
213 views

Postman in Salesforce

If we are using json in post Method by clicking Raw i have given the Request body as like { "name" : "Wingo Ducks", "phone" : "707-555-1234", "website" : "www.wingo.ca.us" } For this body i am ...
0
votes
2answers
184 views

JSON_PARSER_ERROR

Getting an error while posting a request to this class POST Request is { "RequestWrapper": { "sap_org_Id": "US29", "bolNumber": "888888", "ProductLine": [{ ...
3
votes
1answer
993 views

Can we insert multiple records in sObject using REST API post method without using apex class in workbench or postman

/services/data/v36.0/sobject/ObjectName and { "name" : "some name", "Description" : "Some Description" } By using above uri and request body we can insert a single record in object with post method ...
3
votes
3answers
10k views

How to insert multiple records in an object using REST API post method in workbench

By providing following uri and by using following Request Body, we can insert a single record in a sObject uri: /services/data/v36.0/sobjects/sObject Request Body : { "field1" :"value1", "field2" :"...
2
votes
1answer
6k views

how to create a record in workbench using REST Explorer

I am trying to create a new account record using post method in work bench. But I am unable to follow exact format of map url and it is giving the following error. Please suggest me a correct way how ...
2
votes
1answer
104 views

Return a response after calling a REST point created on salesforce, while the REST point is calling a @future method

I have crated a RESTful endpoint on my sandbox. When it is called with the proper input it creates a new contact and then decorates a custom response class I created for that purpose and at the end it ...
-5
votes
1answer
100 views

After posting JSON to external System, I need to return back to salesforce /apex/response page which is not working

<apex:page standardController="Rfleet_Car_Set__c" showHeader="true" extensions="csbreceiver" action="{!test}"> <html> <object style="height : 1200px;width : 1300px;overflow:hidden;"> ...
2
votes
1answer
413 views

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud?

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud? Could the FormData be a problem? I've been using this code: var form = new FormData(); form....
0
votes
1answer
262 views

To post JSON to External System via Visualforce Page usin HTML Form

enter code here <apex:page standardController="fleet_Car_Set__c" showHeader="true"> <html> <object style="height : 1200px;width : 1300px;overflow:hidden;"> <form id="frm"...
1
vote
0answers
192 views

How to redirect after HttpRequest POST?

In a Visualforce controller, if I need to do an HTTP POST and redirect to that same URL, how do I do it? Here's the situation: currently the client has a plain HTML form (standard HTML form and input ...
2
votes
0answers
33 views

Posting Pdf to chatter via bulk api?

Which object should we use to post data's to chatter?I am trying to post a pdf file to a chatter object using curl. What is the name of the object that we should specify in txt file? <?xml ...
1
vote
2answers
10k views

Read GET/POST parameters in apex class when service is called from external client

I am new to salesforce. I created an apex class and exposed it as a Rest service. I want to post some parameters to that service from an external client(not vf page). One way is I append it to the url ...
3
votes
1answer
3k views

Cannot deserialize instance of datetime from VALUE_STRING value

I have a REST webservice which inserts multiple records into custom objects. I am executing it on workbench using the following request: {"req" : {"tickets": [{ "External_TicketID__c" :1853, "...
0
votes
0answers
808 views

How to use Simple Stripe Checkout in salesforce

I am trying to use the Stripe's Simple Checkout Demo with Salesforce to receive a token. Can someone help me figure out why this simple demo does not work? I am not receiving any value in the ...
1
vote
1answer
239 views

To get a postData on apex page controller through custom url without reordering sequence of parameters

I have implemented a code to get a post body data which has been sent through x-www-form-urlencoded header on custom URL. I have used ApexPages.currentPage().getParameters(); but it returns a ...
1
vote
0answers
131 views

User cannot see new post on chatter

A user on chatter is not able to view new posts on both desktop and mobile phone. The user can only see post of last year 2014. could you please help. What may be the cause of this issue.
5
votes
1answer
348 views

Attempting to use jQuery to POST to an external server from a Lightning Component

I'm a new dev so feel free to scrutinize everything I post because I need to learn. So I have a component and am utilizing a helper to send some data to one of our company's external sites using ...
3
votes
1answer
565 views

Writing an HttpPost RestResource for multipart contentType

I've been able to write a simple HttpPost RestResource that would accept a Base64 string as one of the parameters and make an attachment out of it. But actually we want to use multipart instead of ...
2
votes
1answer
7k views

How to write a test class for an apex class with do post method

I have tried to write a test class for the below class with post method. But i am not able to bring the coverage.How can I approach this. Thanks in advance. /* code starts here*/ @RestResource(...
2
votes
1answer
454 views

using VF input fields to set request body for Rest API call

I'm trying to send data from one SFDC org to another org via Rest API. I'm properly able to create Rest Resource in 'receiving org' in this way : @httpPost global static string DepositAmount(string ...
0
votes
1answer
133 views

Using Trigger, how to post in chatter and @mention only a selective contacts list

I need to post in chatter and @ mention to a selective contacts list based on specific criteria that is selected by the logged in user, when creating a specific record. (for example, corporate wants ...
3
votes
1answer
3k views

Novice Question: making a cURL callout from Apex to a 3rd party app?

I'm only familiar with REST and SOAP as API standards, and I'm a novice in general, so pardon my lack of understanding of most of these concepts. I have a web form on a third party heroku app that I ...
4
votes
2answers
3k views

Cannot find Data Extension by external key.

I am getting the response from https://www.exacttargetapis.com/hub/v1/dataevents/BBDD0F10-94A1-4CD6-B7A2-32FEB671E44F/rowset { "message": "Unable to locate data extension with ID bbdd0f10-94a1-...
2
votes
4answers
7k views

How to set header as user name and password in post method

I am developing a batch class to make api calls and get data from that api in to salesforce. I need to send http request by post method, with user name & password as header. I have tried but i got ...