New answers tagged callout
0
votes
Unable to fetch accountId of User in Test class
The issue is here:
User u = TestUtility.createCommunityUser(con.Id,profileId,'Fname','Test');
that calls
public static User createCommunityUser(String contactId, String profId, String firstName, ...
0
votes
How to properly test and assert an @restresource that do multiple API calls?
we can acheive this using map of callouts.
Below article clearly explained the way how to do that
https://developer.salesforce.com/blogs/developer-relations/2013/03/testing-apex-callouts-using-...
0
votes
How to send a callout request with Post method using JSON?
While this wouldn't be valid in Apex (because we can't have multi-line strings), if you try to "pretty print" your JSON, the issue should become obvious
{
"name": "Apple ...
4
votes
GCP created SObject is not immediately available in apex
There is a small, but non-zero, delay where the record might not yet be available outside of the transaction that created it, since sharing and other calculations are deferred outside of the ...
1
vote
Scenarios to use Platform Events
In addition to the other comments, Platform Events are an ideal way to change the running user.
Using the metadata type PlatformEventSubscriberConfig you can define the running user to be (typically) ...
Top 50 recent answers are included
Related Tags
callout × 1280apex × 792
rest-api × 139
unit-test × 128
trigger × 110
integration × 103
future × 102
webservices × 92
httprequest × 91
batch × 90
json × 63
api × 57
apexrest × 55
httpcalloutmock × 54
namedcredentials × 52
rest × 51
soap × 48
visualforce × 39
scheduled-apex × 37
exception × 36
http × 36
lightning-web-components × 31
asynchronous × 29
visual-workflow × 26
governorlimits × 26