You need to sign in to do that
Don't have an account?
mohammad sohail01
public without sharing class comm{
public without sharing class comm {
public void inititaie(set<string> setid, list<applicable_account__c> lstapp,
map<string,map<string,wrapemail>> mapiddlistobj){
code to generate email template and send emails to fetched account details
};};
the above method is synchronous non-static parametrized method which is throwing issue "apex CPU Time limit exceed exception" to overcome the issue how to make the above method to asynchronous method.
public void inititaie(set<string> setid, list<applicable_account__c> lstapp,
map<string,map<string,wrapemail>> mapiddlistobj){
code to generate email template and send emails to fetched account details
};};
the above method is synchronous non-static parametrized method which is throwing issue "apex CPU Time limit exceed exception" to overcome the issue how to make the above method to asynchronous method.
To address the "Apex CPU Time limit exceed exception" and make the method asynchronous, you can use the @future annotation in Salesforce. The @future annotation allows you to run the method asynchronously in the background, which can help prevent CPU time limit exceeded exceptions.
For future method, you can refer to this link https://www.apexhours.com/future-method-in-salesforce/
Thanks,
Nishant