Hey,
When using Xrm.Navigation.navigatTo() within the pageInput parameter, there is a property called data, which is an object that lets you specify default values for fields on the form that is being navigated to.
I'm trying to figure out the format or just see an example of that. The Microsoft docs links to a page that doesn't make sense to me as I'm a rookie. The link to follow starts talking about populating the extraqs url parameter.
Would it look something like this:
let pageInput = {
pageType: 'entityrecord',
entityName: cloneEntity,
entityId: newRecordGuid,
data: {
prefix_fieldName: 'DEFAULT FIELD VALUE'
}
};
Xrm.Navigation.navigateTo(pageInput).then(
(success) => {
// successCallback
},
(error) => {
// errorCallback
}
);
Thanks
I have also written a blog post about it with code example for setting fields with various data types, including lookup and partylist. (in case anyone else is having an issue with complex data types)
I preemptively posted this question, but was able to do some testing and it looks as though the above syntax is correct.
It worked for me, but if you still see an issue, let me know!
stampcoin
17
mmbr1606
13
Super User 2025 Season 1
ankit_singhal
11
Super User 2025 Season 1