Follow us on Social Media Channels - Telegram Channel - telegram.dog/sfdcpanther TH-cam - www.youtube.com/@pantherschools LinkedIn - www.linkedin.com/in/cloudyamit/ Topmate - topmate.io/cloudyamit Instagram - instagram.com/cloudyamit/ Subscribe to our TH-cam channel using the below link 👇 bit.ly/pantherschools Join our telegram channel 👇 bit.ly/sfdcpanther
Hi @pantherSchools I tried to use the same technique to resolve the Data loss possibility in future Method but it did not work. getting error "Variable does not exist: accIDSet" at this line List AccRec = [Select id, name From Account where ID IN : accIDSet]; Please review the code : public class futuretry { Public Set accIDSet; public static void myMethod() { // Non Setup object Account a = new Account(Name='ApexHours'); insert a; futuretest(); } Public futuretry(Set AccpIds){ This.accIDSet = AccpIds; }
@Future Public Static void futuretest(){ List AccRec = [Select id, name From Account where ID IN : accIDSet]; // Setup object Profile p = [SELECT Id FROM Profile WHERE Name='Standard User']; UserRole r = [SELECT Id FROM UserRole WHERE Name='CEO'];
These are two different things. If u want to get the Value inside the method you need to pass inside the method and the same is applicable for the constructor. As the future method is static, if you want to access any variable inside the static method then the variable should be static at the class level.
Follow us on Social Media Channels -
Telegram Channel - telegram.dog/sfdcpanther
TH-cam - www.youtube.com/@pantherschools
LinkedIn - www.linkedin.com/in/cloudyamit/
Topmate - topmate.io/cloudyamit
Instagram - instagram.com/cloudyamit/
Subscribe to our TH-cam channel using the below link 👇
bit.ly/pantherschools
Join our telegram channel 👇
bit.ly/sfdcpanther
Bhaiya aapka sikhane ka style bahut badiya lagta hai
Great video 💯👌
badhiya hai seekho seekho
Amazing learning apex.Great job.🎉
Thank you 🤗
need to pass argument
Hello Sir,
Could you please provide solution for the assignment given in the video?
Which assignment you are talking about?
Hi @pantherSchools, Can you share the notes file as well.
You can access those notes from academy.pantherschools.com/digital-products/ Link
The above links contains some other digital products as well.
@pantherSchools how wr remember the syntax if interviewer asks
It's all about practice. If u keep practicing then you will always remember the syntax. If u will try to remember then you will always forget
How many records ca be processed in single Queable Apex class?
There are no limits for the number of records
how to learn syntax
Practice. Only practice
sir i want to be in the live session where I can interact ; where do you provide the zoon link so that i can be in the gallery as well?
while joining from you tube I am just able to listen
Hi Nikhil,
These are the recorded sessions. We are not having the live sessions anymore
Hi @pantherSchools
I tried to use the same technique to resolve the Data loss possibility in future Method but it did not work. getting error "Variable does not exist: accIDSet" at this line
List AccRec = [Select id, name From Account where ID IN : accIDSet];
Please review the code :
public class futuretry {
Public Set accIDSet;
public static void myMethod() {
// Non Setup object
Account a = new Account(Name='ApexHours');
insert a;
futuretest();
}
Public futuretry(Set AccpIds){
This.accIDSet = AccpIds;
}
@Future
Public Static void futuretest(){
List AccRec = [Select id, name From Account where ID IN : accIDSet];
// Setup object
Profile p = [SELECT Id FROM Profile WHERE Name='Standard User'];
UserRole r = [SELECT Id FROM UserRole WHERE Name='CEO'];
You need to pass the set inside the method not inside the constructor
@@pantherschools Then i got again same error. its not accessable for consturctor.
These are two different things. If u want to get the Value inside the method you need to pass inside the method and the same is applicable for the constructor.
As the future method is static, if you want to access any variable inside the static method then the variable should be static at the class level.
Thank you 😇@@mukeshsingh-bv7rd