I have 2 Dataverse Tables.
Requests
- Request Name (Text)
- Request Type (Lookup)
Request Types
- Request Type Name (Text)
- Request Description (Text)
Do you know a way I can display the Request Definition field (From Requests Type table) to show on the Requests Form.
Here is a mocked up screen to show what I want.
Hello @dpoggemann,
Yes you are perfectly correct 🙂
@365-Assist : You can use quick view form to display data without script. if you want to retrive value from script you can use below code
Hi @365-Assist ,
Since the Requests table has a lookup column to the Request Types table you can utilize a Quick View Form to display any columns from the Request Types table on the Requests form. Please see the following for details: https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/create-edit-quick-view-forms
Hello @365-Assist,
You need to use Custom JavaScript to achieve this type of Behavior
function getDescriptionField(executionContext){
var formContext = executionContext.getFormContext();
Xrm.WebApi.online.retrieveRecord("REQUEST ENTITY TYPE LOGICALNAME", formContext.getAttribute("REQUEST TYPE FIELD LOGICALANME").getValue().replace("{","").replace("}",""), "?$select=REQUEST DESCRIPTION FILD LOGICALNAME").then(
function success(result) {
formContext.getAttribute("DESTINATION ENTITY FIELD LOGICAL NAME").setValue(result["REQUEST DESCRIPTION FILD LOGICALNAME"]);
},
function(error) {
Xrm.Utility.alertDialog(error.message);
}
);
}
As we are using inside Form it will be good to go with Async Call.
You need to write this Script in OnChange Request Type Field.
My Youtube Video for Step by Step behavior on how to Write JS : https://www.youtube.com/watch?v=x8kYNCkikgs&t=14s
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com
mmbr1606
22
Super User 2025 Season 1
stampcoin
19
Michael E. Gernaey
15
Super User 2025 Season 1