Questions tagged [get]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
34 views

CORS problem in Lightning

My Lightning component makes 'GET' callouts for two different URLs of the same service. For one it goes correct each time: https://cors-anywhere.herokuapp.com/https://integration.visma.net/API/...
0
votes
2answers
39 views

How to get value of a record after parsing [closed]

I have parsed an object and want to get a value. How do I achieve this. Its a little confusing for me, is this a list I have to loop trough or an object. My debug shows the following: oldList: ...
0
votes
0answers
22 views

More than one GET request inside a Apex Controller class [duplicate]

I used Creating an endpoint in Salesforce and using REST API to externally access it tutorial to print a list of custom objects inside a Visualforce Page in Visualforce Site. I followed the tutorial ...
1
vote
1answer
25 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
0answers
23 views

How to download standard Salesforce attachment in javascript using XHR

We have a VF page. From that page, we are trying to download standard Salesforce attachment using XMLHttpRequest in javascript. We are doing GET request with attachment download URL as the endpoint. ...
0
votes
1answer
31 views

Unittest eror: System.NullPointerException: Attempt to de-reference a null object

I am writing a unittest for my apex class but get an error System.NullPointerException: Attempt to de-reference a null object on my unittest for variable: testoptions Apex class public class ...
0
votes
1answer
18 views

How to test a List<SelectOtion> in unittest

How to test a List<SelectOtion> in unittest. I have the following apexclass public class WebToObjAttachments { .. public List<SelectOption> CountryOptions { get { ...
0
votes
1answer
26 views

How to expose webservice through domain

I am setting up an webservice which needs to be accessible from outside. I have created a domain and have my class a public. How do I give acces to the object? Apex @RestResource(urlMapping='/...
1
vote
2answers
58 views

How to loop trough map and get record by field value

I have a map<Id,String> subMap this is the id of a record where the string is a name of a Future_record__c yet to be made after a callout. How do I loop through the subMap and get the ...
2
votes
2answers
40 views

RestResource extracting array from JSON packet

I am currently receving a JSON packet from an external server and placing the values in variables for further use. The JSON packet has an array that can and will grow depending on the amount of assets ...
1
vote
1answer
17 views

Is it possible to remove of filter keysets by a standard method and only maintain keyset which start with a string

I query over Custom metadata to get 1 record(settings) with custom fields "MdtFieldsAcc" I pass the fields in a map with .getPopulatedFieldsAsMap() and then currently remove 1 keyset (Id). Is there a ...
0
votes
1answer
57 views

Pulling values from inner curly brackets

I am trying to pull the values from a JSON response and have managed to get most of the values except the one I need which is nested in an inner set of curly brackets public class web_ser { @future(...
1
vote
1answer
33 views

How to get time left on OrgPartition from Platform Cache?

Is it possible to get the time left from Platform Cache for a particular partition? You initiate by: Cache.OrgPartition orgPart = Cache.Org.getPartition('local.myStore'); You put the value by (...
1
vote
1answer
107 views

Set HttpWebRequest to Accept = application/xml

If I am querying using the following, then Function CallSFDCAPI works. services/data/v41.0/query?q=Select+Id+FROM+Vendor__c" I am required get the response in XML format. But how can i get the ...
3
votes
1answer
480 views

REST GET API response does not contain null fields

I have written a REST API endpoint for Account object for GET operation. The code is below - @httpget global static list<Account> doget(){ RestRequest req = RestContext.request; RestResponse ...
0
votes
1answer
38 views

Getting null in control from input field

I'm stack. I Have a simple controller and visualforce page. Controller: public class NewTaskSchedulerController { public Event Event {get; set;} public NewTaskSchedulerController(){ ...
0
votes
1answer
52 views

Retrieve id of div from within a get()

In my lightning web component I am trying to loop through a an array they determines if an item in a combobox should be marked or not: HTML <ul class="slds-listbox slds-listbox_vertical" role="...
0
votes
1answer
549 views

Get current ID in ligtning component for page Community Salesforce

I need help please, I'm trying to get the ID of the current page. from a page of a community in salesforce, but every time I reload the page to get the ID this arrives undefined, the URL that I am ...
0
votes
2answers
107 views

Catch block code coverage for @HttpPost and @HttpGet REST API

I have some code in my catch block for both @Post and @Get methods. I need to cover catch block to get to 75% for GET, got catch block covered for POST Here is an example : // POST my JSON : [ ...
0
votes
0answers
26 views

Having trouble with a date/time get;set;

UPDATE I made a global string in the controller called temp date composed of the date as yyyy/mm/dd and then used THIS is the get;set; var rather than the one I directly use in the query. When I am ...