Timeline for On lightning:recordEditForm how can I retrieve the recordUi onload-actions return parameter?
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 4, 2018 at 12:00 | comment | added | Uwe Heim | super cool, thanks a lot! exactly that was what i'm looking for. Gut feeling tells me i likely need more flexibility than lightning:inputField - and this could be the key to the castle! | |
May 4, 2018 at 11:59 | vote | accept | Uwe Heim | ||
May 4, 2018 at 11:57 | comment | added | sfdcfox♦ | @UweHeim Yeah, my code when I tried this just to check resulted in a 420k or so JSON string. You don't get just the record, but everything you need to render a UI. | |
May 4, 2018 at 11:55 | comment | added | Uwe Heim | onsole.log( JSON.stringify( evt.getParam("recordUi") ) ) brings A HUGE bloat of warnings, but finally there are values!!! and lots of them! I will need to inspect that deeper, but generally it seems feasible to leech some UI-API stuff in Lightning Components without having to call the API ;-) | |
May 4, 2018 at 11:50 | comment | added | sfdcfox♦ | @UweHeim JSON.stringify can convert the object to a plain JSON string. You'll probably want to read the docs and/or copy the JSON to a JSON formatter so you can read it easier. | |
May 4, 2018 at 11:45 | comment | added | Uwe Heim | cool, thx. Is there a simple way to recursively dump the entire object with all it's sublevels on the console so that I can have a quick glance on everything returned? Or is it necessary to crawl through that nested thing "manually"? Because of it's functions instead of plain properties, the browser-console can't do a great job in dumping it out. | |
May 4, 2018 at 11:39 | comment | added | sfdcfox♦ |
@UweHeim It is usable. Proxy just means that it's Locker Service locked down. To see the keys on it, try Object.keys(recordUi) .
|
|
May 4, 2018 at 11:32 | comment | added | Uwe Heim | cool, that works... but unfortunately the thing console.logs only as "Proxy {}" - whatever it means. The parameter is existent, but unusable as it seems or intentionally inaccessibly or it's a bug. Seems that it's unusable, but you answer is perfectly right! | |
May 4, 2018 at 11:24 | history | answered | sfdcfox♦ | CC BY-SA 4.0 |