Picklists not displaying in Lightning App

Matt WyreMatt Wyre Member
edited February 4 in Problems
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?

Comments

  • Peter KongPeter Kong Skuad
    edited February 4
    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.
  • PaulPaul Member, Sonar ✭✭
    edited April 2019
    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:

    image

    Same page via preview:
    image

  • Peter KongPeter Kong Skuad
    edited April 2019
    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?
  • PaulPaul Member, Sonar ✭✭
    edited April 2019
    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.
  • Peter KongPeter Kong Skuad
    edited April 2019
    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
  • Peter KongPeter Kong Skuad
    edited April 2019
    So I activated record Types and assigned my Account to one, but I am still able to access the metadata alright in Lightning!
  • Peter KongPeter Kong Skuad
    edited April 2019
    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:
    image

    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.
    image
    image
  • PaulPaul Member, Sonar ✭✭
    edited April 2019
    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?
  • Peter KongPeter Kong Skuad
    edited April 2019
    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:image

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

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

    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!


  • PaulPaul Member, Sonar ✭✭
    edited April 2019
    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?
  • Zach McElrathZach McElrath Skuad
    edited April 2019
    Paul, does the user viewing the page have the "Skuid Page Viewer" permission set assigned to them?
  • PaulPaul Member, Sonar ✭✭
    edited April 2019
    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?  
  • Zach McElrathZach McElrath Skuad
    edited April 2019
    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?
  • PaulPaul Member, Sonar ✭✭
    edited April 2019
    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.
  • Mark DeSimoneMark DeSimone Skuid Mod 🛠️ 
    edited May 2019
    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. 
  • harry silverstoneharry silverstone Member ✭✭
    edited May 2019
    Have tried this with one picklist on one page layout related to the account. No change seen.
  • andre bandre b Member
    edited October 2019
    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/articleView?id=000321501&type=1&mode=1
  • Ram RyRam Ry Member
    edited October 2019
    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
  • Jaya GouruJaya Gouru Member
    edited October 2019
    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.
  • Jaya GouruJaya Gouru Member
    edited October 2019
    did you apply any security fix Ram? is the issue resolved for you?
Sign In or Register to comment.