UI Only Reference Fields - Documentation??

edited June 20, 2017 in Questions
This is probably just a Friday miss on my part but I've seen the UI-Only Models for 10.0 but I'm not at all understanding how Reference types are used for UI only fields. The closest I see is "Referential Data Access" but those steps look nothing like the Reference UI.

I haven't figured out if these UI only fields solve my use case, I think so, for a Java snippet I now have but want to remove.

Essentially we have picklist on multiple Account fields. (field1, field2, etc.). When a user is adding a new Contact I want the picklists from field1 to show. User then selects a value from that which is stored on the Contact. Same for field2, etc.

Once I can get the data to display and be selected by user I'm probably ok using the action framework to store the data on Contact. But displaying is perplexing me.


  • Emily Davis
    Emily Davis ✭✭✭✭
    edited June 17, 2017
    Hi, DDeveaux,
    I think a little more clarity on your use case may be helpful...

    So you have a Ui-only picklist field (currently built with a JS snippet) that you're using to populate data on a new Contact record, and it sounds like the options for this field are being sourced from multiple Account fields? Are these multiple Account fields what "field1, field2, etc." correspond to?

    What field type are the fields on the Account object? Picklist, reference, string, etc...?

    Are you trying to bring all field options from the Account fields into a single picklist field for the user to select from (i.e. Bring values from field1, field2, etc. into a single picklist field), or multiple picklist fields (i.e. Show one field to the user for all values from field1, another field for all values from field2, etc.)?

    Hope those questions make sense.

  • ddeveaux
    edited June 17, 2017
    But use case aside, I was just trying to find information on how to use the UI only "Reference" option. I am trying to understand how to use that and how it differs from using a formula on the model.
  • Emily Davis
    Emily Davis ✭✭✭✭
    edited June 20, 2017
    I see what you're saying. Using the MODEL_LOOKUP function in a Ui-only Formula Field (the "Referential Data Access" section you're referring to) is really more to look up the field value of a row in a model, generally from a different model on the page. 

    You're right, we don't have a lot of documentation on Ui-only Reference Fields right now. I'll bring that to the attention of our docs team as a future addition. For now, here is some information that might be helpful...

    A Ui-only Reference Field is used as a way to look up a specific record. Because it behaves as model field, there are specific benefits to using it (being able to add Lookup Filters, being able to tie into Action Framework with it). Common use cases I can think of are:
    1. Using the field as a filter (e.g. when a particular Salesforce Account is selected, run actions to filter a model of Salesforce Contacts and requery the model). It provides a different visual way of presenting a filter, and certain granular control that you don't get with a standard Skuid filter.
    2. Using the field to prepopulate some data (e.g. when an Account record is selected, run actions to update a Contact record with values from that Account)
    That being said, for your particular use case, it sounds like you really need a way to access Account metadata (picklist field options) rather than Account data (values from a particular Account record)? In this case, I would explore another option. The most straightforward option might be to create a "New Account" model (Account model where "Load Model data on page load" property = false and "Create default row if Model has none" = true). You can then include the Account picklist fields in this model, show them in the page, and run actions on this model that update the Contact record when an Account field is updated.

    Does that help?

  • Hi @"Emily Davis"

    I am still not able to find any documentation for reference-type UI-only fields. Can you please let know when can we expect it or direct me to the documentation if it is already there (and somehow I missed it).

  • Germany3
    Germany3 🛠️ 

    Hey @Bhanu !

    I have found this in our docs that may be a helpful place for you to start.

    If you can share your use case I can help you find more specific docs.


  • I'm not expecting documentation, but would appreciate any examples for creating a reference field, specifically on REST models, I'm unable to create them. The reference fields seem to work on UI Models.

    Either it shows me the first 25-50 results (idk how I managed that), but once I select an item the field is highlighted for yellow (changed) but the option selected doesn't show up. Also, when i press on the search button for reference field, the dialog shoes all the rows, but they are all empty. Or, it doesn't even allow me to edit the field, it goes into read only mode. I think I tried applying every option...

    field = {};
    field.id = 'customReference'
    field.label = 'customReference'
    field.accessible = true,
    field.createable = true,
    field.enclosedInQuotes = true,
    field.editable = true;
    field.dataSourceName = 'salesforce'; 
    field.defaultValues = [];
    field.displaytype = 'REFERENCE';
    field.evaluatedDefaultValue = undefined;
    field.isNamePointing = false;
    field.keyField = 'Id';
    field.ogdisplaytype = "TEXT";
    field.originalDisplayType = "TEXT";
    field.ref = "skuid__Page__c";
    // field.overrideMetadata = true;
    field.referenceTo = [{
        "accessible": true,
        "createable": true, 
        "objectName": "skuid__Page__c"
    field.rel = field.id + '__r';
    field.relationshipName = field.id + '__r'; 
    // field.sortable =  true
    field.uiOnly = true;

    Thank you,


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!