Ui-only reference field not saving the value in the UI only field

I have a UI-only field that is a reference field. The lookup works fine. When I save the record and refresh the page the information in the UI-only field is no longer there. What am I missing to ensure the data saves properly?

I don’t think UI only Fields save any info to a database. You would have to use regular Salesforce fields to store data so that it would appear on next page load.

The user and all related content has been deleted.

Thank you for the clarification. I didn’t think the Ui-Only field would save back to SF, I thought it would just be saved client side. I am curious what would a scenario be when using the reference ui-only field?

I believe UI only fields can be used in model conditions. perhaps you might want a user to select a contact and then activate a model condition that uses the contact Id to pull up all tasks related to that contact in repeating field editors instead of a table??? I’m sure someone will think of some reason to need it! UI also allows you to perform actions and calculate formulas in real time without needing to save to the database. You could theoretically create a proposal that uses formulas on your data in real time and then decide if you want to commit it to the database. Perhaps you are negotiating in the phone and you are not sure if the customer wants to buy or what the exact terms would be or which service he will choose from the related look up field so you don’t want to commit to the database just to update the total price times a 15% discount broken into monthly payments. I believe you could accomplish this all with UI fields and then commit to the database using actions of the customer decides to move forward. Last thing I can think of is that perhaps you have a third party rest service that stores raw data that you then want to do math on and commit the result to the Salesforce database as opposed to storing all the raw data In Salesforce and doing the math in Salesforce. You might need to reference related records in the third party and/or salesforce database to do your math. I haven’t used them much so exercise caution in taking my word for it!

The user and all related content has been deleted.


Thank you for this use case. I am trying to do something similar but have not been totally successful yet. 

1.I am using a Ui-only Reference field to look up to my Item object.
2. Based on the item that is displayed another model will show all the invoices that have that item. There is a condition that looks to the ui-only field. 

So far I have not been able to just show invoices that have the selected item.