New answers tagged

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, ...
cropredy's user avatar
  • 69.9k
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-...
Durai Pandi's user avatar
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 ...
Derek F's user avatar
  • 59.3k
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 ...
sfdcfox's user avatar
  • 481k
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) ...
cropredy's user avatar
  • 69.9k

Top 50 recent answers are included