+ Start a Discussion
Calvin CouchCalvin Couch 

Lightning component not functioning if referenced fields aren't on a layout

We have a lightning component we use on (Lead) that is supposed to display different messages based on how 2 boolean fields are set.  We couldn't get the messages to display unless we put the fields on the page layout.  The permissions on the fields are read only for all profiles - so I don't see why they need to be on the layout for this to work.  (We have the same functionality in classic, works fine and the fields aren't on the layout).  Anyone else run into this or something similar?
Karin AthanasKarin Athanas
Yes, I needed to have a today date field on the layout for my formula process to run properly. I believe you can set the field to not visible, that way it's there, but not there.
Calvin CouchCalvin Couch
Thank you for the suggestion. Unfortunately, making this not visible didn’t work. I will note that we are getting different behavior in 2 different sandboxes. In one sandbox the fields are not on the layout and the component message displays properly as expected…in the other sandbox the fields have to be on the layout for the component message to display. Very odd behavior. Calvin CI Technology Application Services Salesforce
I am having the same issue.. I have a Lightning Component on a record page, the component references some Formula fields (Read only). When I remove them from the page, they don't show in the component anymore!