Share via


SysVersionControlSystem.canImport Method [AX 2012]

Validates whether the file can be imported without conflicting with an existing ID of the same object type.

Syntax

public boolean canImport(SysVersionControllable controllable, Filename filename)

Run On

Client

Parameters

Return Value

Type: boolean
true if no conflict with an existing ID was found or the object does not contain an ID; otherwise, false.

Exceptions

Exception Condition
Error

The file contains more than one object.

Error

The file contains more than one object.

Remarks

The validation is checking for one object only in the file. If the file contains more than one object, the method will throw an exception.

If the file does not exist, an error will added to the Infolog.

If the file conflicts with an existing ID, an error will be added to the Infolog.

The method does not import the file.

See Also

Reference

SysVersionControlSystem Class