SysFileDeployment Class [AX 2012]
The SysFileDeployment class is used for deploying files from the server to the clients.
| Method | Description | |
|---|---|---|
| cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) |
| copy | |
| destinationPath | Returns the destination path of the file, which is the path where the file is copied to. |
| equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) |
| filename | Must be overridden to return the name of the file to deploy. |
| getClientVersion | |
| getServerVersion | |
| getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) |
| handle | Retrieves the handle of the class of the object. (Inherited from Object.) |
| isClientUpdated | |
| new | Initializes a new instance of the Object class. (Inherited from Object.) |
| notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) |
| notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) |
| objectOnServer | Determines whether the object is on a server. (Inherited from Object.) |
| owner | Returns the instance that owns the object. (Inherited from Object.) |
| parmClientVersion | Gets the ClientVersion parameter. |
| parmServerVersion | Gets the ServerVersion parameter. |
| register | |
| run | |
| setServerVersion | |
| setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) |
| sourcePath | Must return the source path of the file, which is the path where the file is copied from. If this method is not overridden, it assumes that the file is placed in the share/include directory. |
| tempFilePrefix | |
| toString | Returns a string that represents the current object. (Inherited from Object.) |
| unRegister | |
| usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) |
| wait | Pauses a process. (Inherited from Object.) |
| xml | Returns an XML string that represents the current object. (Inherited from Object.) |
| ::getServerFile | |
| ::getServerFileTimeAccessed | |
| ::getServerFileTimeCreated | |
| ::getServerFileTimeModified | |
| ::isNameValid | |
| ::setFileTimeServer2Client |
The files will be copied through the Microsoft Dynamics AX client/server protocols, so do not worry about Microsoft Windows security aspects.
The file deployment feature will only copy newer or nonexistent files to the client. It performs the checks when the client starts for the first time.
To deploy a file, follow these steps:
-
Create a class that extends either SysFileDeploymentFile Class or SysFileDeploymentDLL Class.
-
Override the SysFileDeployment.filename Method so that it returns the name of the file.
-
Modify the SysFileDeployer::filesToDeploy Method to also return the class ID of the new class.
-
Make sure that the file is present in the share/include directory on the server. Otherwise, override the SysFileDeployment.sourcePath Method to return the path of the file.
-
Override the SysFileDeployment.destinationPath Method to return the path where you want the file copied to. This is not necessary when extending SysFileDeploymentDLL Class, as it defaults to the bin directory.
-
Change the build number of the application. It is done in the ApplicationVersion::buildNo Method. This is only necessary for a system that is already running.