Picklists not displaying in Lightning App

  • 1
  • Problem
  • Updated 1 month ago
  • In Progress
We have a Skuid page in a Lighting App and for some reason some of our picklists are not displaying values when they are clicked on. We've verified that users have permissions to the fields, field level security is good, and have upgraded to the latest release. It's happening when we go to create a new record in a table (but only on some tables) and in a sidebar component we're using for the log a call functionality. If we override the field metadata, we can get the values to appear but the field renders tied to those values aren't being respected...

Anyone have any idea as to what's happening?
Photo of Matt Wyre

Matt Wyre

  • 270 Points 250 badge 2x thumb

Posted 7 months ago

  • 1
Photo of Peter Kong

Peter Kong, Employee

  • 596 Points 500 badge 2x thumb
Hey Matt! 

I'm going to try to reproduce your issue in my own dev box, but a couple of questions:

1. I'm assuming by latest you mean Spark 12.1.1?
2. You had mentioned that the picklists aren't displaying on "some tables", and that these are in a sidebar component. How are those tables set up? And do they malfunction outside of the sidebar component (if you copied them and placed them elsewhere in the Lightning App)?
3. Are these picklist fields dependent at all?

Thanks,
Peter K.
Photo of Paul

Paul

  • 864 Points 500 badge 2x thumb
Hi Peter, I'm working with Matt on this.  

Here is an example of a simple page showing a picklist for industry:
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" theme="AODesktopTheme">
<models>
<model id="Account" limit="1" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Account">
<fields>
<field id="RecordTypeId"/>
<field id="Id"/>
<field id="Name"/>
<field id="Industry"/>
</fields>
<conditions>
<condition type="param" value="Id" field="Id" operator="=" enclosevalueinquotes="true"/>
</conditions>
<actions/>
</model>
</models>
<components>
<basicfieldeditor showheader="true" showsavecancel="true" showerrorsinline="true" model="Account" uniqueid="sk-oF3-312" mode="edit">
<columns>
<column width="100%" uniqueid="sk-oF3-308">
<sections>
<section title="Section A" uniqueid="sk-oF3-309" collapsible="no">
<fields>
<field uniqueid="sk-oFB-328" id="Industry"/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<javascript/>
<css/>
<actionsequences uniqueid="sk-2xaC-116"/>
</resources>
<styles>
</styles>
<interactions/>
</skuidpage>



If we click preview, we get what we expect, the picklist with options for industry.  If we deploy this page in lightning (tried both using the skuid page component as well as a lightning component, it says "none" with no options.

Lightning:



Same page via preview:
Photo of Peter Kong

Peter Kong, Employee

  • 596 Points 500 badge 2x thumb
Thanks for your response Paul!

So I copied + pasted the XML into Skuid and deployed into Lightning. From what I can tell, I see the picklist metadata in both the Skuid Preview and the Lightning view for my Account record.

Are there any errors on your guys' end in the browser's console log?
Photo of Paul

Paul

  • 864 Points 500 badge 2x thumb
The plot thickens.  The console is challenging in lighting.  I could use some pointers on how to pull errors out of a lightning deployed skuid page.

In your org, do you have record types enabled?  Can you try adding record types if not see if it still works?  Record types and picklists have not been my friend in the past, so I have a suspicion there may be a quirk there.
Photo of Peter Kong

Peter Kong, Employee

  • 596 Points 500 badge 2x thumb
I have not activated record types - let me try that.

In the meantime, here's our documentation on debugging in Lightning: 
https://docs.skuid.com/latest/en/skuid/deploy/salesforce/lightning/#debugging-in-lightning-experience
Photo of Peter Kong

Peter Kong, Employee

  • 596 Points 500 badge 2x thumb
So I activated record Types and assigned my Account to one, but I am still able to access the metadata alright in Lightning!
Photo of Peter Kong

Peter Kong, Employee

  • 596 Points 500 badge 2x thumb
Here's something I think would be worthwhile to check on your Lightning Page, to confirm if the error is occurring on a Model level or the renderer:
1. skuid.model.map(), after following the process in the article I previously posted:


2. Navigate to the Account Model in question, and open up the "fields" array, and check the Industry field's "pickListEntries". I imagine if those are correctly populated, the issue is in the Component using the Account Model.

Photo of Paul

Paul

  • 864 Points 500 badge 2x thumb
When using the debugging instructions, I don't get a "highlighted skuid variable" in the result, so I'm not able to get to the model.  Can we have a call on this?
Photo of Peter Kong

Peter Kong, Employee

  • 596 Points 500 badge 2x thumb
Reading back through the instructions, I can see why you might be confused!

Ignore steps 2 & 3 and try this instead:

The object returned by the command in step 1 is the skuid variable:

Step 4: In order to call the object, right click the object "{...}" and select "store as global variable":

Step 5: For ease of use, feel free to rename the temp variable assigned to the Object to "skuid":


Let me know if that gets you through; sorry that happened. I believe the documentation might be inaccurate so I will be reporting this back to the team!
Photo of Paul

Paul

  • 864 Points 500 badge 2x thumb
Yes, the skuid.model.map() shows all the picklist field options.  It is a basic field editor component though, how do we get the fields in the model into the ui?
Photo of Zach McElrath

Zach McElrath, Employee

  • 54,014 Points 50k badge 2x thumb
Paul, does the user viewing the page have the "Skuid Page Viewer" permission set assigned to them?
Photo of Paul

Paul

  • 864 Points 500 badge 2x thumb
This user has the 'Skuid Admin' permission set assigned to them.  I presume that is sufficient and a superset of the page view perm set?  
Photo of Zach McElrath

Zach McElrath, Employee

  • 54,014 Points 50k badge 2x thumb
Yep, that should be good. Is Industry dependent on any other fields? Like, is there any other Controlling Field on Account which restricts the values for Industry?
Photo of Paul

Paul

  • 864 Points 500 badge 2x thumb
No, but record types are enabled, however all fields are in the record type.  Also, the fields do show up in skuid.model.map(), just not on the page when deployed inside lightning.  Previewing the page does show all fields in the picklist.

Also, Industry is just a test field to demonstrate the error on a native field so you can reproduce - all picklists were showing this behavior on the real page, but some are custom fields.
(Edited)
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 12,352 Points 10k badge 2x thumb
Hi Paul,

Can you check to make sure the affected picklists are present on each record type's Page Layout, in the object's page layouts? My engineers tell me this is necessary for Skuid to be able to pull in the picklist options successfully via Salesforce's Lightning API. 
Photo of harry silverstone

harry silverstone

  • 162 Points 100 badge 2x thumb
Have tried this with one picklist on one page layout related to the account. No change seen.
Photo of andre b

andre b

  • 140 Points 100 badge 2x thumb
Hi, we had the same issue. At the end it was a security issue. Solution for us was to add salesforce recommended ip range(s) to the users profile settings

https://help.salesforce.com/articleVi...
Photo of Jaya Gouru

Jaya Gouru

  • 132 Points 100 badge 2x thumb
Hi Andre,
we have the same problem where the picklist field values display doesn't allow users to select, values are visible when they click on edit pencil icon but page doesn't allow to select the value and list collapses when we move the cursor to select the value from edit icon.

Issue is happening in the lightning mode, same with checkbox field.
(Edited)
Photo of Ram Ry

Ram Ry

  • 80 Points 75 badge 2x thumb
Apart from picklist i also see the problem with checkboxes, the value are not persisting
we recently moved to lightning. Not clear how security setting will impact the UI.
if we change to classic mode, no issue with these elements
Photo of Jaya Gouru

Jaya Gouru

  • 132 Points 100 badge 2x thumb
did you apply any security fix Ram? is the issue resolved for you?