New answers tagged

1

The error says clearly whats needed UNKNOWN_EXCEPTION, portal account owner must have a role So what you need is to make sure the Account owner has a Role assigned and not your portal user. Find the Accounts of the Contacts records which you are creating experience cloud users. Find the owner of these Accounts and make sure they have a role assigned.


0

You can create class that implements Queueable and make the last callout in it. So the final logic will be: Scheduler: serialize data for callout in future method Future(Callout=true): run first callout group, save data from responses (which is needed) for queue Queueable class implements System.Queueable, Database.AllowsCallouts: run second callout group, ...


1

I'm going to offer a minor update on sfdcfox's answer as it was very helpful to me. PageReference getContent() and getContentAsPDF() methods now behave as Callouts. I dealt with this by implementing queueable apex as follows: public without sharing class PdfGeneratorHelper implements Queueable, Database.AllowsCallouts{... Database.AllowsCallouts is required....


1

Threads are generally not a useful framework to use to think about Asynchronous Apex, in my opinion; the transaction is what is critical. So My assumption here is, future or any async job waits for the main thread to finish its transaction and then calls the async functions This is basically accurate although the nomenclature of threads is not quite right. ...


Top 50 recent answers are included