You need to sign in to do that
Don't have an account?
Ravindra reddy M
in @future method parameters we cannot use object as parameters.if i need to updated 10 users so it fires 10 times but the requirement is all the 10 records updated at a time means method was called only one time in salesforce
HI all,
in @future method parameters we cannot use object as parameters.if i need to updated 10 users so it fires 10 times but the requirement is all the 10 records updated at a time means method was called only one time
plz help to reloslove this ,thanks in advance .
Thanks & Regards
Ravindra
in @future method parameters we cannot use object as parameters.if i need to updated 10 users so it fires 10 times but the requirement is all the 10 records updated at a time means method was called only one time
plz help to reloslove this ,thanks in advance .
Thanks & Regards
Ravindra
You can call that method once and pass all 10 Ids of users atonce in a Set<Id>. In future metode, use an SOQL query to fetch records of all thses 10 users in update the required fields, Update the entire list.
Call below method only once by passing all 10 Ids of users at once in a Set<Id>
Please let me know if it helps.
Thanks,
Nagendra
All Answers
I am a bit confused about what you are trying to achieve. Still, to address the first question that you asked regarding using objects as parametes, the answer is that even though objects cannot be used as paramaters, you can still use IDs or List of IDs as parameters in the future method and then query the object data within the future method using the list of IDs. That should work out for you !
Kindly mark it as an answer if that resolves your problem.
You can call that method once and pass all 10 Ids of users atonce in a Set<Id>. In future metode, use an SOQL query to fetch records of all thses 10 users in update the required fields, Update the entire list.
Call below method only once by passing all 10 Ids of users at once in a Set<Id>
Please let me know if it helps.
Thanks,
Nagendra