I am working in a Salesforce Org that uses Shield and has the Name field encrypted. The issue I am having is that one of the fields I am trying to reference in skuid is a lookup field. Despite the fact that I am telling the lookup to order by the createddate, it’s ordering the search list by name and as a result is giving em an error.
"SELECT Name,Id FROM Account ORDER BY Name,Id LIMIT 51
Error:field ‘Name’ can not be sorted in a query call
"
I am certain the issue is that the name field on the account object is encrypted, so I am unsure why this is happening if I am specifying a different field to order by.
Now you just need to make sure your accounts model (a) contains any fields you want to use in the display and search template and (b) has no limits so it will bring in all the accounts in your org (with any relevant conditions applied). If you have a lot of accounts in the org, it might make sense to load model in an action sequence that runs at page load so it doesn’t slow down initial page load.
This way you’re loading the account names into the page so they’re accessible to the lookup.
Cheers!
@Anna_Wiersema Thanks so much! this was exactly what I needed! I had to modify a few other things as the search functionality wasn’t working perfectly (since you cant search by an encrypted field), but I figured out a way to get around that. Really appreciate your help, I was about to pull out what little hair i had left.