Hi everyone,
I have a multistep form and i need to auto populate lookup field.
This is modal and it is out of box. I implemented from power app management.
I belive that this should be doable in power pages management. I tried to write javascript code but when i click submit button, the record is saving automatically. I used this code but i couldn't handle the get record id after saving dataverse but before closing this modal. And how can i get the record id which is created in my account information step to set lookup field.
document.addEventListener('DOMContentLoaded', function() {
var button = document.getElementById('InsertButton');
var entityLogicalName = $("#EntityFormControl_EntityFormView_EntityName").val();
console.log(entityLogicalName);
// Getting the Record ID
var recodId = $("#EntityFormControl_EntityFormView_EntityID").val();
console.log(recodId);
if (button) {
button.addEventListener('click', function(event) {
// Getting the Entity Logical
var entityLogicalName = $("#EntityFormControl_EntityFormView_EntityName").val();
console.log(entityLogicalName);
// Getting the Record ID
var recodId = $("#EntityFormControl_EntityFormView_EntityID").val();
console.log(recodId);
});
} else {
console.error('Buton bulunamadı: InsertButton');
}
});

Report
All responses (
Answers (