Use the script include for Scripted Extension Point
-
- UpdatedAug 1, 2024
- 2 minutes to read
- Washington DC
- Legal Service Delivery
Use the script include for Scripted Extension Point
Use the script include for Scripted Extension Point to update the custom fields on the iManage storage based on the mapping provided in the functions.
- On the script include form, the script field is auto populated with the structure of expected function definitions. For more information on script include form, see Script includes.
- In the script include, the function have inputs that is available when the implementation is called.
- In case of iManage Extension Point (sn_lg_ops.iManageCustomFieldHelperExtension), following are the function definition, expectation and possible outputs:
Table 1. Function names, expected results, and possible outputs Function Name Usage Information Output canHandle Input: TableName: Name of the table of which the current record is being processed.
Use: This function is used to identify whether this implementation should be executed if the TableName you are passing is using the same condition that is defined in the function.
Example: In Legal Request Management, you have the input as tableName to identify if this implementation is for the same table.
The possible script would be as follows:
canHandle: function(tableName) { return tableName == "The target table of implementation "; },
True/False True: The current execution should be executed.
False: The current execution shouldn’t be executed.
Process Input: requestRecord: GlideRecord object of the current legal record which is being processed.
Use: This function is used to create mapping between the iManage Fields and the fields of the legal record.
Example: In Legal Request Management, you have the GlideRecord object of the current legal table record in concern, which is used to get the values of the record fields and map to the custom fields in the process function.
The possible script would be as follows:
process: function(requestRecord) { return { custom1: requestRecord.getDisplayValue("practice_area"), custom2: data, custom4: requestRecord.requested_for.country, description: requestRecord.description }; },
{ custom1: requestRecord.getDisplayValue(“practice_area”). custom2: requestRecord.getValue("description”) }