hello,
I have create a button that shows a popup window to assign a note to a ticket. Well now I want the ID or Ticktnumber Prepopulate in my second form (differt table, differt from).. I'm at the right spot because I can enter some pre filled in random text but how can I get the right date from the underlaying form?
So in the portal management in the box Value? Does someone has some ideas what to fill down there?
See attachments :)! Thx!!
Solved! Go to Solution.
In your first attachment use this code:
// Using jquery Get value from your field by name
var currentRecordId = $('#cr5ba_id').val();
// Set value into previous step/Form
window.localStorage.setItem('ticketid', currentRecordId);
Regards
Mohammad
@Atiour thx for the help. Got it!
Previous Form:
$(document).ready(function(){
var currentRecordId = $('#cr5ba_id').val();
window.localStorage.setItem('vorigeId', currentRecordId);
});
Next form:
$(document).ready(function(){
var previousTickedId = window.localStorage.getItem('vorigeId');
document.getElementById("idxat_ticketid").value = previousTickedId;
Hi @Robin1988 ,
You can use javascript.
// Set value into previous step/Form
window.localStorage.setItem('studentregistrationadvancestudentGuid', studentGuid);
// Get value into next step/Form
var requeststudentId = window.localStorage.getItem('studentregistrationadvancestudentGuid');
Regards
Mohammad
hi @Robin1988 I believe you are using JS/HTML to build your custom pop-up right?
can you share this piece of code? you need to retrieve the value of your ticket id, for example $("#<ticket id field>").val();
and then populate this into your new pop-up, please note that this won't create any link/relationship between them, only reference the text itself
is this what you are looking for? if the pop-up is related, did you consider adding a relationship between the tables?
Power Pages Super User | MVP
Hello @Atiour I tried some, but didnt work so far. But I'm not sure if I'm using the right names.
So in your case:
What is: studentregistrationadvancestudentGuid, something like my own variable? Or my dataverse table name?
What is: studentGuid
What is: requeststudentId, maybe the name of the field where I want to populate?
Thanks again!
Hi @OliverRodrigues thx for your reply
In the first basic form I just use the 'Additional Settings' and then the action to make a button to open another form.(See my attachment). That is auto generate the pop up to my second form.
I have a related field and a simple text field to test both. Because in my case it doesnt matter how the 'ticket id' is copied to the next form. So only reference the text itself is enough.
Here is a part of the page source. So I need the variable of "cr5ba_id"
_EntityFormView$cr5ba_id" type="text" value="87514" id="cr5ba_id" class="text integer form-cont
Hope this made it more clear haha :)! Thx thxx
Okay, I had the impression that this was a custom pop-up, if not I don't think you need any custom code.
If your lookup being populated in your pop-up? Make sure the lookup field is populated, if you only need to show the ticket ID, you can then add a quick-view form to the related entity, and add the Ticket Id to the qvf, this should show there now: Create or edit model-driven app quick view forms in Power Apps - Power Apps | Microsoft Docs
Power Pages Super User | MVP
// Set value into previous step/Form
window.localStorage.setItem('studentregistrationadvancestudentGuid', studentGuid);
studentregistrationadvancestudentGuid: Your defined variable name
studentGuid: D365 field value which you want to pass another form.
// Get value into next step/Form
var requeststudentId = window.localStorage.getItem('studentregistrationadvancestudentGuid');
requeststudentId: Get the value into another form and populate form field according to your need.
Regards
Mohammad
Hi @Atiour , hmm to bad no reaction from the form. I'm very close. I'm sure..
I dont know what to ask more from you. maybe one last check to my two attachments. I'll try my self some more! Thx for the help!
Hi! That is not possible for me in this situation because I have a relation just for the test. But there not realy related to eachother. I'm sure javascript has to do the job... thx for your help!
In your first attachment use this code:
// Using jquery Get value from your field by name
var currentRecordId = $('#cr5ba_id').val();
// Set value into previous step/Form
window.localStorage.setItem('ticketid', currentRecordId);
Regards
Mohammad