Hi Team,
I am trying to get selected records from main grid in model-driven app to show on custom page.
On Microsoft site, there is code to pass single record through javascript. I am able to pass guids of multiple items but can't find a way to use them in custom page App.OnStart property.
function run(selectedItems)
{
let selectedItem = selectedItems[0];
if (selectedItem) {
let pageInput = {
pageType: "custom",
name: "<logical page name>",
entityName: selectedItem.TypeName,
recordId: selectedItem.Id,
};
let navigationOptions = {
target: 1
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions)
.then(
function () {
// Handle success
}
).catch(
function (error) {
// Handle error
}
);
}
}
Below code is used to get a single record but if I am sending ids of multiple records, how can I use them with param?
App.OnStart=Set(RecordItem,
If(IsBlank(Param("recordId")),
First(<entity>),
LookUp(<entity>, <entityIdField> = GUID(Param("recordId"))))
)
Any help is greatly appreciated!!
Thanks!
User | Count |
---|---|
258 | |
108 | |
93 | |
57 | |
40 |