function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sfdc31Sfdc31 

Lightning data service pass id dynamically

Is it possible to pass id of the record to the LDS (lightning Data Service) dynamically
sfdcMonkey.comsfdcMonkey.com
Hi PRS31,
yes you can pass the recordId dynamically

let us know, you if you have any query else close your query by choosing best answer
Thanks,
Sfdc31Sfdc31
We want to assign related record to LDS. We are fetching id from doinit and passing to LDS which is throwing error since it is getting assigned to undefined before doinit is getting called.
sfdcMonkey.comsfdcMonkey.com
can you please share your all code snippet
thanks
Balagopal GBalagopal G

 

Will this LDS works other than Component Load or page Load.

For example : In a custom vf page, a Lightning App is loaded and then inside a component in  the same app, on a button click in that component , in modal (without component refresh or page load) CRUD operations are included.
Is it possible to use LDS in the above scenario or LDS will work only on Page Load?!.