Class NSImportAgent
This agent can be used to import data into the system.
Syntax
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)
Parameters
| Type | Name | Description |
|---|---|---|
| Integer | countColumns |
Returns
| Type | Description |
|---|---|
| NSImportLine |
Examples
NSImportAgent agent;
Integer countColumns;
NSImportLine res = agent.CreateDefaultImportLine(countColumns);
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)
Parameters
| Type | Name | Description |
|---|---|---|
| restriction | Archive restrictions. |
|
| String[] | columns | |
| Integer | connectionId | Connection ID for ERP system |
| Integer | erpActorType | ERP actor type. See ErpActorType. |
Returns
| Type | Description |
|---|---|
| NSImportErpData |
Examples
NSImportAgent agent;
NSArchiveRestrictionInfo[] restriction;
String[] columns;
Integer connectionId;
Integer erpActorType;
NSImportErpData res = agent.CreateErpImportData(restriction, columns, connectionId, erpActorType);
PreviewImport(NSImportLine[],String[],String,String)
Previews the import
Declaration
NSImportLine[] PreviewImport(NSImportLine[] importLines, String[] columnDefinition, String culture, String context)
Parameters
| Type | Name | Description |
|---|---|---|
| NSImportLine[] | importLines | |
| String[] | columnDefinition | |
| String | culture | |
| String | context |
Returns
| Type | Description |
|---|---|
| NSImportLine[] |
Examples
NSImportAgent agent;
NSImportLine[] importLines;
String[] columnDefinition;
String culture;
String context;
NSImportLine[] res = agent.PreviewImport(importLines, columnDefinition, culture, context);
SaveImport(NSImportLine[],String[],Bool,String,String)
Does the actual import
Declaration
Integer[] SaveImport(NSImportLine[] importLines, String[] columnDefinition, Bool createSelection, String culture, String context)
Parameters
| Type | Name | Description |
|---|---|---|
| NSImportLine[] | importLines | |
| String[] | columnDefinition | |
| Bool | createSelection | |
| String | culture | |
| String | context |
Returns
| Type | Description |
|---|---|
| Integer[] |
Examples
NSImportAgent agent;
NSImportLine[] importLines;
String[] columnDefinition;
Bool createSelection;
String culture;
String context;
Integer[] res = agent.SaveImport(importLines, columnDefinition, createSelection, culture, context);