Previous Topic

Next Topic

AddFileLink - MaxBasic Function

AddFileLink(Account File: String, Account Code: String, File Path: String[, File Source: String, Reference: String, Comment: String, Category 1: String,Category 2: String]): Number

Adds a file link, returning LinkID.

AddFileLink function syntax has these named arguments:

Parameter

Description

Account File

Required. The file type to create the link for.

Account Code

Required. The value used to create the link. A unique code or ID.

File Path

Required. Must be a relative path rooted in the Links directory or use empty string or filename only to default from the Link Path for the Account File if specified in Setup > [Module] > Settings > Links tab.

File Source

Optional. File to copy and name as specified in the File path. If not specified file is assumed to exist in the file path and link will be created.

Reference

Optional. Reference for the added link.

Comment

Optional. Comment for the added link.

Category 1

Optional. Link Category 1 for the added link.

Category 2

Optional. Link Category 2 for the added link.

Example code:

const SourceFile = "c:\data\AccredoSaturn\TestHelpLinks.csv"

const FilePath = "\AR\ASHENG\MyLinkedFile.csv"

Dim LinkID as Number

LinkID = AddFileLink("ARCUST", "ASHENG", FilePath, SourceFile)

Msgbox("LinkID: " & LinkID)

or

AddFileLink("ARCUST", "BOWEN", "Renamed.txt", "c:\data\Saturn600\TestHelpLinks.csv")

will copy c:\data\saturn600\TestHelpLinks.csv to the links folder, and link path if one is specified for ARCUST in AR Settings > Links, and rename the file to "Renamed.txt" before adding it as a link against customer BOWEN.

See Also

Objects Functions

Book Contents

Book Index