- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-19-2024 12:04 AM
Hi all,
I have a record producer Form A on portal and after submitting this form A, a button 'Proceed' will be visible. On click of this button another record producer Form B will open on the portal (The code for onclick of this button is written in a widget).
The Requirement is, I need to copy certain values submitted in Form A and populate it onload in Form B.
Could you please suggest on how to achieve this requirement.
Many Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-30-2025 10:46 PM
Step 1:
The code for onclick of 'Proceed' button is written in a widget - In this widget in Client Controller I added
window.open('portal_url_of_record_producer_B&formARec='+$scope.data.sys_id,'_blank');
here $scope.data.sys_id contains the sys_id of the record on submit of Record Producer A.
Step 2:
I created an OnLoad Catalog Client Script on Record Producer B.
Script:
function onLoad() {
var urlParams = new URLSearchParams(location.search);
var tempRecordID = urlParams.get('formARec');
if (tempRecordID) {
var ga = new GlideAjax(<Script Include name>);
ga.addParam('sysparm_name', <func name>);
ga.addParam('sys_id', tempRecordID);
ga.getXML(myCallBack);
function myCallBack(response) {
var answer = response.responseXML.documentElement.getAttribute('answer');
var recData = JSON.parse(answer);
g_form.setValue('<field_name>', recData.<field_name>);
// Added setValue for all the fields that need to be populated on Record Producer B
}
}
}
Script Include:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-19-2024 07:07 AM
You may want to look into order guides. The user can fill out the shared fields on the "Describe Needs" section and then be forced to create both Form A and Form B in the "Fill Out Form" section, and you can populate the fields in both forms.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-19-2024 09:05 AM
Yes, As Jennifer mentioned order guide suit for this requirement...
Please mark the answer as helpful and correct if helped.
Kind Regards,
Ravi Chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-30-2025 10:46 PM
Step 1:
The code for onclick of 'Proceed' button is written in a widget - In this widget in Client Controller I added
window.open('portal_url_of_record_producer_B&formARec='+$scope.data.sys_id,'_blank');
here $scope.data.sys_id contains the sys_id of the record on submit of Record Producer A.
Step 2:
I created an OnLoad Catalog Client Script on Record Producer B.
Script:
function onLoad() {
var urlParams = new URLSearchParams(location.search);
var tempRecordID = urlParams.get('formARec');
if (tempRecordID) {
var ga = new GlideAjax(<Script Include name>);
ga.addParam('sysparm_name', <func name>);
ga.addParam('sys_id', tempRecordID);
ga.getXML(myCallBack);
function myCallBack(response) {
var answer = response.responseXML.documentElement.getAttribute('answer');
var recData = JSON.parse(answer);
g_form.setValue('<field_name>', recData.<field_name>);
// Added setValue for all the fields that need to be populated on Record Producer B
}
}
}
Script Include: