MSI.ViewModify

boolean MSI.ViewModify ( 

number hView,

number ModifyMode,

number hRecord )

Description

Calls the MsiViewModify function that updates a fetched record.

Note: Custom actions can only add, modify, or remove temporary rows, columns, or tables from a database. Custom actions cannot modify persistent data in a database, such as data that is a part of the database stored on disk. For more information, see MSDN: Accessing the Current Installer Session from Inside a Custom Action.

Parameters

hView

(number) The handle to the view.

ModifyMode

(number) The modify mode to use. Choose from:

CONSTANT

VALUE

DESCRIPTION

MSIMODIFY_SEEK

-1

Reposition to current record primary key.

MSIMODIFY_REFRESH

0

Refetch current record data. Must first call MSI.ViewFetch with the same record.

MSIMODIFY_INSERT

1

Insert new record, fails if matching key exists.

MSIMODIFY_UPDATE

2

Update existing non-key data of fetched record. Must first call MSI.ViewFetch.

MSIMODIFY_ASSIGN

3

Insert record, replacing any existing record.

MSIMODIFY_REPLACE

4

Update record, delete old if primary key edit. Must first call MSI.ViewFetch with the same record.

MSIMODIFY_MERGE

5

Fails if record with duplicate key not identical.

MSIMODIFY_DELETE

6

Remove row referenced by this record from table. Must first call MSI.ViewFetch with the same record.

MSIMODIFY_INSERT_TEMPORARY

7

Insert a temporary record.

MSIMODIFY_VALIDATE

8

Validate a fetched record. Must first call MSI.ViewFetch with the same record. You can obtain validation errors using MSI.ViewGetError.

MSIMODIFY_VALIDATE_NEW

9

Validate a new record. You can obtain validation errors using MSI.ViewGetError.

MSIMODIFY_VALIDATE_FIELD

10

Validate field(s) of an incomplete record. You can obtain validation errors using MSI.ViewGetError.

MSIMODIFY_VALIDATE_DELETE

11

Validate before deleting record. Must first call MSI.ViewFetch. You can obtain validation errors using MSI.ViewGetError.

hRecord

(number) The handle to the record to modify.

Returns

(boolean)  Returns true if the action succeeds. You can use Application.GetLastError to determine whether this action failed, and why. You can also retrieve extended error information using the MSI.GetLastErrorRecord action.

See also:  Related Actions