Localization Record Context Field Management (LRCFM)
The Localization record context field management system enables you to hide the fields, sublists, sublist columns on a record opened based on the localization context.
LRCFM hides the fields, sublists, sublist columns on a record if the localization context does not match.
The Localization Assistant SuiteApp supports the LRCFM feature. You or your developers can apply the filters of the localization record context to the workflows of different countries.
Implementation of LRCFM by Localization Assistant SuiteApp
A custom user event script is setup in the Localization Assistant SuiteApp. When a supported record is updated, the BeforeLoad user event script is triggered by the LRC Field Manager Plug-in type. For more information about the supported records, refer to Records Supporting LRCFM by Localization Assistant SuiteApp
The LRC Field Manager Plug-in hides the fields, sublists, sublist columns with internal Ids mentioned in the plug-in implementation.
The following image displays the flow of the plug-in implementation:
Advantages of Record Localization Context
The advantages of using the Localization Assistant SuiteApp for Record Localization Context are as follows:
-
Partners and customers can use this feature in their country-specific feature implementation.
-
You can avoid creating multiple user event scripts to hide fields based on their localization context for multiple SuiteApps.
-
Prevent performance delays by avoiding multiple user event scripts and the time used for loading the records.
Records Supporting LRCFM by Localization Assistant SuiteApp
LRCFM feature supports the following records:
-
-
Assembly/Bill of Materials
-
Blanket Purchase Order
-
Cash Refund
-
Cash Sale
-
Check
-
Contact
-
Credit Card Charge
-
Credit Memo
-
Customer
-
Customer Deposit
-
Customer Payment
-
Customer Refund
-
Employee
-
Estimate
-
Expense Report
-
Gift Certificate Item
-
Inventory Part
-
Inventory Status Change
-
Invoice
-
Item Fulfillment
-
Journal Entry
-
Kit Item
-
Lead
-
Lot Numbered Assembly/Bill of Materials
-
Lot Numbered Inventory Item
-
Non-Inventory Part
-
Opportunity
-
Other Charge Item
-
Partner
-
Prospect
-
Purchase Contract
-
Purchase Order
-
Requisition
-
Return Authorization
-
Sales Order
-
Serialized Assembly/Bill of Materials
-
Serialized Inventory Item
-
Service
-
Subsidiary
-
Vendor
-
Vendor Bill
-
Vendor Credit
-
Vendor Payment
-
Vendor Return Authorization
-
LRCFM feature does not support the following records:
-
Blanket Purchase Order
-
Credit Card Charge
-
Journal Entry
-
Purchase Contract
-
Requisition
-
Subsidiary
The Localization Assistant SuiteApp is required for localization SuiteApps that use the record localization context in country-specific workflows. For more information about Record Localization Context, see Record Localization Context Overview.
Creating LRCFM Plug-in Implementation
You must create a plug-in implementation for the LRC field manager plug-in type for each localization country.
The following is a sample script of Mexico Localization that you can use as a reference in creating your own script file:
/**
* @NApiVersion 2.x
* @NScriptType plugintypeimpl
*/
define(['N/format','N/record'], function(format,record) {
function addUIElementsForManagement(obj) {
return {
country: 'MX',
fields: [{
id:'custbody_mx_trans_body_fld',
type: format.Type.TEXT,//or "checkbox"
clearingValue: 'defaultstring',
showOnlyIn:[
record.Type.PURCHASE_ORDER
],
isMandatory:false
},
{
id:'custentity_mx_entity_fld',
type: format.Type.TEXT,
clearingValue: 'defaultString',
showOnlyIn:[
record.Type.CUSTOMER,
record.Type.EMPLOYEE
],
isMandatory:true
},
{
id:'custitem_lrc_test_mx_item_field'
}
]
sublists: ['recmachcustrecord_lrc_test_link_mx_entity', 'recmachcustrecord_lrc_test_link_mx_item'],
sublistColumns: [{
id:'recmachcustrecord_lrc_test_link_mx_entity',
columnIds:['custrecord_lrc_test_sub_col_mx']
}],
}
}
return {
addUIElementsForManagement: addUIElementsForManagement
}
})
The parameters of this script are listed in the following table:
Parameter |
Type |
Description |
Required |
---|---|---|---|
country |
String |
This parameter refers to the code of the localization country for which the plug-in implementation is created. Example: MX, US, CA |
Yes |
fields |
Array of Objects |
This parameter refers to an array of objects with the following parameters:
|
No |
sublists |
Array of Strings |
This parameter refers to an array having the list of sublist's Ids that belong to the selected localization country. |
No |
sublistsColumns |
Array of Objects |
This parameter refers to an array of objects with the following parameters:
|
No |
Id |
String |
This parameter refers to the Id of the sublist on which the sublist column is displayed. |
Yes |
columnsIds |
Array of Strings |
This parameter refers to the column Ids for the given sublist. |
Yes |
If there is no sublist mentioned in the script, then you must not delete the sublist. You must identify the sublist as an empty parameter. This rule also applies for fields and sublistscolums parameters.
To create LRC field manager plug-in implementation:
-
Go to Customization > Plug-ins > Plug-in Implementations > New.
-
Create a JavaScript file using the sample script.
-
Select the JavaScript file you created from the Script File field
and click Create Plug-in Implementation.
-
Select the LRC Field Manager Plug-in Type from the Select Plug-in Type record.
-
Type the information in the required fields on the Plug-in Implementation record.
-
Click Save.