How to do Map to field on MRVS

Saridha_L1
Tera Expert

Hi Team,

Can anyone please help , How to do Map to  field on  MRVS ,there is no direct option, is there anyway to achieve.

Regards,

Saridha.L.

1 ACCEPTED SOLUTION

try with below code , i have added log as well. so check the log if it does not work, and let me know the log result as well

 

 


var mrvs = JSON.parse(producer.journal_entry_line_items);

var rowCount = mrvs.length;

gs.log('Length is '+ rowCount);

for (var i = 0; i < rowCount; i++) {
var gr = new GlideRecord('x_journal_entr_journal_entry');
gr.initialize();
gr.setValue('u_account', row.u_account);
gr.setValue('u_cost_center', row.u_cost_center);
gr.insert();
}

View solution in original post

31 REPLIES 31

Yes.

Can you share your table setup? Which fields does it have? Is there a reference to the record you are actually submitting with the MRVS? Etc..

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Sure. Thank you.

Please find the Table:

 

find_real_file.png

 

MRVS:

find_real_file.png

 

Please suggest me how to map.

So where is the relation with the actual record you are creating with the Record Producer? Against which table is this? Because I assume the records on your custom table which should be created based on the MRVS rows, should have a relation with this record?

What about the mandatory fields on your custom table, which are not in the MRVS?

What about the difference in field / variable type for for example "Account"?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

I just ticked the check box of variable which needs to be mapped with the table fields. Please find the screenshot.

 

find_real_file.png