Click or drag to resize

DataExchangeUploadAndExecute Method

Note: This API is now obsolete.

Execute a data exchange that is used for importing data from a CSV file to the current application. The CSV file can either be located on a server or the local machine.
Codemethod usage
Designed to be used in a process only (Yes/No)No
Action Object (data object type)N/A

The function will: 1.Impersonate the client, if his/her username and password are valid for the server of the given domain 2.Compare the give textfile configuration's file version with its matching file with the given path in the server 3.If the server file is newer than the configuration file then create new file version for the data exchange configuration 4.Execute the data exchange

Example of a configuration for data exchanging from a file on a remote server:

<UploadAndExecute>
 <DataExchangeId>1001</DataExchangeId>
 <UNCPath>\\Filesrv01\Shared\AppFile\UploadAndExecuteTest.csv</UNCPath>
 <Domain>OMADA</Domain>
 <Username>sm</Username>
 <Password>Superman1</Password>
</UploadAndExecute>

Example from a local machine:

<UploadAndExecute>
 <DataExchangeId>1001</DataExchangeId>
 <UNCPath>C:\Temp\UploadAndExecuteTest.csv</UNCPath>
</UploadAndExecute>

Namespace:  Omada.OE.UtilityCodeAssembly
Assembly:  Omada.OE.UtilityCodeAssembly (in Omada.OE.UtilityCodeAssembly.dll) Version: 15.0.0.0
Syntax
C#
[ObsoleteAttribute("Migrate to the DataObjectExchangeUtil feature")]
public bool UploadAndExecute(
	CodeMethodInvokeContext context,
	int configId
)

Parameters

context
Type: Omada.OE.ModelCodeMethodInvokeContext
Invoke context object
configId
Type: SystemInt32
Id of a code method configuration

Return Value

Type: Boolean
True if OK
See Also