Want to populate legal entity based upon GL company code and legal entity from two different tables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 05:30 AM - edited 06-27-2023 05:37 AM
Hi All,
I want to populate legal entity (node 2 ) based upon field GL company code on one table and legal entity from another table. These two fields have same values. I am trying to achieve it by below script but it says Legal Entity Undefined. If anyone worked on similar kind of script then please give solutions. Thanks in advance.
var le;
var costCentre = new GlideRecord("cmn_cost_center");
costCentre.query();
while(costCentre.next())
{
var legalEntity= new GlideRecord("sn_risk_advanced_Legal_entities");
legalEntity.addQuery('u_entity_code', costCentre.u_gl_company_code);
legalEntity.query();
le=legalEntity.u_node2;
}
g_scratchpad.lgl_Enty=le;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 12:13 AM
To Understand What is a GL code and how to automate it? Read This Blog..