For a given model, skuid makes available the KeyPrefix property that provides the org specific object prefix. This comes in very handy.
We have a scenario were we would like to build a hyperlink to the “tab/list” view for fields on a skuid page. The fields we would like this for are reference/lookup fields on the object being displayed. For example, on our Order page, we display the Account for the order. We would like to put a hyperlink to “/001/o” in the label area. Getting the hyperlink in the label is easy. Doing this dynamically to support deployments to other orgs is the challenge.
Is there a way to access the Key Prefix for a lookup field on an object?
My solution thus far is to create a remote method that gets invoked when the hyperlink is clicked that would call getDescribe() on the SObject (the name would be provided in the parameter to the remote method), return the key prefix and then redirect appropriately. Another option might be to create VF page that does something similar.
I’m hoping there might be an easier way though. Does skuid have this information under the covers where it might be accessible?
Thoughts/suggestions are appreciated!
Question
Determine key prefix for reference field
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.