Class NSImportAgent

This agent can be used to import data into the system.

Examples

NSImportAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSImportAgent()

This agent can be used to import data into the system.

Declaration

NSImportAgent

Examples

NSImportAgent agent;
agent.callMethod(arg1, arg2);

Methods

CreateDefaultImportLine(Integer)

Creates a new empty import row with x count of values

Declaration

NSImportLine CreateDefaultImportLine(Integer countColumns)

Examples

NSImportAgent agent;
Integer countColumns;
NSImportLine res = agent.CreateDefaultImportLine(countColumns);

Parameters

Type Name Description
Integer countColumns

Returns

Type Description
NSImportLine

CreateErpImportData(NSArchiveRestrictionInfo[],String[],Integer,Integer)

Populates the ImportLines and columnDefs based from ERP system

Declaration

NSImportErpData CreateErpImportData(NSArchiveRestrictionInfo[] restriction, String[] columns, Integer connectionId, Integer erpActorType)

Examples

NSImportAgent agent;
NSArchiveRestrictionInfo[] restriction;
String[] columns;
Integer connectionId;
Integer erpActorType;
NSImportErpData res = agent.CreateErpImportData(restriction, columns, connectionId, erpActorType);

Parameters

Type Name Description
restriction Archive restrictions.
String[] columns
Integer connectionId Connection ID for ERP system
Integer erpActorType ERP actor type. See <xref href="CRMScript.NetServer.ErpActorType" data-throw-if-not-resolved="false"></xref>.

Returns

Type Description
NSImportErpData

PreviewImport(NSImportLine[],String[],String,String)

Previews the import

Declaration

NSImportLine[] PreviewImport(NSImportLine[] importLines, String[] columnDefinition, String culture, String context)

Examples

NSImportAgent agent;
NSImportLine[] importLines;
String[] columnDefinition;
String culture;
String context;
NSImportLine[] res = agent.PreviewImport(importLines, columnDefinition, culture, context);

Parameters

Type Name Description
NSImportLine[] importLines
String[] columnDefinition
String culture
String context

Returns

Type Description
NSImportLine[]

SaveImport(NSImportLine[],String[],Bool,String,String)

Does the actual import

Declaration

Integer[] SaveImport(NSImportLine[] importLines, String[] columnDefinition, Bool createSelection, String culture, String context)

Examples

NSImportAgent agent;
NSImportLine[] importLines;
String[] columnDefinition;
Bool createSelection;
String culture;
String context;
Integer[] res = agent.SaveImport(importLines, columnDefinition, createSelection, culture, context);

Parameters

Type Name Description
NSImportLine[] importLines
String[] columnDefinition
Bool createSelection
String culture
String context

Returns

Type Description
Integer[]