+ Start a Discussion
Andy on CloudAndy on Cloud 

Dynamic Rendering Using Fieldsets in Lightning

I couldn't find this in Lightning documentation.  In VF, we can use Fieldsets through Schema Object to loop through all fields and render all fields inside a fieldset so we can change the fields in the fieldset order, read-only, or add/remove fields without changing code.

I cannot find such $ObjectType schema API in Lightning, do we still have access to these when we code in Lightning Expression?
Please take a look here.

Pawan Kumar
Andy on CloudAndy on Cloud
Thanks Pawan but this link is about a solution that I know already (and it's quite old, 2014), the problem is that we need to have extra server roundtrip, not ideal.  I guess my question was more of, it's 2018 already, does the Lightning API natively support client side schema API yet?  I guess not then.
Sorry, Andy. Good to know it.

Please take a look for lightning here. This may help you with what you need.


Pawan Kumar
Hi Andy & all,

if still searching to add the fieldset in lightning and please refer the below links:


Thanks & Regards,
Sakthivel Madesh
Andy on CloudAndy on Cloud
Thank you for all the answers but I guess the short answer is "No".  All these solutions are not a good approach where the schema has to be accessed by going back to Apex to get it.  And if that is the case, might as well using the Metadata API to get the most updated schema instead of buildin custom AuraEnabled Apex code to serve one particular purpose.
Mina Michel GorgyMina Michel Gorgy
Hi everyone,
I'm facing a similar situation and I really need some assistance here!
I have on the Opportunity, stages and steps (dependant dropdowns), and I wanted to show specific fields for every step being selected. 
The user will be selecting which STAGE and which STEP, however will NOT save the final stage and step... He'll only select them CLIENT SIDE, then I would like to show some fields (FieldSet, I assume), that will load with the opportunity data.
Then the user can SAVE some changes on the VISIBLE fields, then the page will reload.

I was able to reach almost all this solution except reflecting back the updated information to the DB... Any hints would be appreciated!?

I believe having 2 apex:repeat tags in my visualforce page is messing it up during saving, althought it works JUST FINE for rendering!

Thanks in advance,