- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2023 11:44 PM
I Want to populate my mrvs data from record producer to a table under a related list of a record form.
I have created a custom table in which similar fields are created as i have in the mrvs + record reference field + mrvs name reference field
In the producer side i have used this code to initialize the record on the table mentioned:
(function() {
var mrvs = producer.business_function;
var length = mrvs.getRowCount();
for(var i = 0; i < length; i++) {
var row = mrvs.getRow(i);
var cells = row.getCells();
var businessFunction = new GlideRecord('incident_task');
businessFunction.initialize();
businessFunction.setValue('af_opportunity', current.getUniqueValue());
businessFunction.setValue('business_function', cells[0].getDisplayValue()); //field type select box
businessFunction.setValue('add_info', cells[1]);
businessFunction.setValue('product_services', cells[1].getDisplayValue()); //field type select box
businessFunction.insert();
}
})();
Kindly help me to achieve this..
Thank You
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 04:00 AM
Hello,
Thanks for your help...This code worked well when i parsed the MRVS rows into JSON and then after initializing the record, removed the setValue and replaced with:
businessFunction.business_function = mrvs[i].business_function;
businessFunction.add_info = mrvs[i].add_info;..............and so on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 04:00 AM
Hello,
Thanks for your help...This code worked well when i parsed the MRVS rows into JSON and then after initializing the record, removed the setValue and replaced with:
businessFunction.business_function = mrvs[i].business_function;
businessFunction.add_info = mrvs[i].add_info;..............and so on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 04:02 AM
@Apurv Kumar You're welcome ,Please mark it as correct solution so others can find this in future easily.
Thanks