ive done quite a bit of research into this now and non of the examples are helpful or apply. What I am trying to do is when the user loads the Add screen, I want the Details Picker to display a name when the screen is created rather than having to select it everytime. im sure this can be done but my javascript skills are lacking.
thanks for any help, and below is an example:
this name is stored within a table and can be searched for in this modal picker/details picker but as you can imagine, if this value is required 50% of the time then manually adding it is not only time consuming but would become a little tedious
a text box can be manipulated by using contentItem.value
or element.innerText
after pressing post render
on each item, but this does not work with this type of control, and I am presented with the below error:
heres some useful information which may help:
- ProjectData (datasource)
- Main screen references OrderRequest
- foreign key link references ShippingContact and CustomerName is searched for on the DetailsPicker
based on the below answer do I need to substitute in anything to the top function, and then base don the 2nd part of code, where you have written defaultLookup(screen.Customer, "Contact", "Contacts",
what needs to go here?
example of what im trying to change, and unfortunately this isn't working
var defaultValue = "Test User";
var filter = "(ContactName eq " + msls._toODataString(defaultValue, ":String") + ")";
defaultLookup(screen.OrderRequest, "ContactName", "ShippingContacts", { filter: filter });
See Question&Answers more detail:os