You need to sign in to do that
Don't have an account?
Ankur Srivastava
use value returned in server controller method to process further
I have the following method returning a changed owner id when a person selects a new value from lightning component. I want to use this ownerId in a method of some other class. The value of the ownerId is available in this method. I am unable to use this return ownerId in a different class. It looks trivial but I don't know how to do it.
@AuraEnabled
public static Id getNewRecordOwner(Id ownerId)
{
System.debug('The value of Owner ID'+ownerId);
leadConvertController lctr = new leadConvertController(ownerId);
lctr.ownerIdChanged=ownerId;
return ownerId;
}
@AuraEnabled
public static Id getNewRecordOwner(Id ownerId)
{
System.debug('The value of Owner ID'+ownerId);
leadConvertController lctr = new leadConvertController(ownerId);
lctr.ownerIdChanged=ownerId;
return ownerId;
}
All Answers
Check the below code