Update-NAVApplicationObject

Update-NAVApplicationObject

Applies a set of deltas to the specified application objects. The files that describe the delta are generated by the Compare-NAVApplicationObject cmdlet.

Syntax

Parameter Set: Default
Update-NAVApplicationObject [-TargetPath] <String[]> [-DeltaPath] <String[]> [-ResultPath] <String> [-DateTimeProperty <DateTimePropertyAction> ] [-DisableCommentOut] [-DocumentationConflict <DocumentationConflictAction> ] [-Force] [-Legacy] [-ModifiedProperty <ModifiedPropertyAction> ] [-PassThru] [-Strict] [-VersionListProperty <VersionListPropertyAction> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

Use the Update-NAVApplicationObject cmdlet to apply to the specified application objects. The files that describe the delta are generated by the Compare-NAVApplicationObject cmdlet. Any conflicts that are found during the update are defined in text files with the file extension .conflict.

For example, you compare two versions of table 27: an original version and a modified version. The modified version has added a field to the table compared to the original version. In this example, the Compare-NAVApplicationObject cmdlet creates a delta file, TAB27.delta, that describes the difference that the extra field must be inserted into the table. Optionally, you can use the Set-NAVApplicationObjectProperty cmdlet to change the version or other properties. Then, you use Update-NAVApplicationObject cmdlet to apply the delta to target files.

Parameters

-DateTimeProperty<DateTimePropertyAction>

Specifies the value of the Date and Time properties for the updated application objects. The default value is Now. The following options are available:

Now

In the result of the update, the Date and properties are set to the current date and time.

Clear

In the result of the update, the Date and Time properties are empty. This is the default value.

FromTarget

In the result of the application merge, the Date and Time properties are set to the value from the target application objects.

FromDelta

In the result of the update, the Date and Time properties are set to the value from the delta files.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DeltaPath<String[]>

Specifies the folder where the result of the comparison between two versions of application objects are stored.

The files in the folder must be .delta files that have been generated by the Compare-NAVApplicationObject cmdlet.

Aliases

PSPath,Delta

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DisableCommentOut

Specifies if the cmdlet must not comment out merged code that cannot be imported into the development environment.

Merged code is passed through a simple parser, and any indication that it cannot be imported into the development environment results in commenting out the code. Use this parameter to disable this functionality. Code can be commented out if the merge results in unbalanced BEGIN and END statements, such as if both MODIFIED and TARGET contain an END statement.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Legacy

Reduces the scope of the cmdlet. Do not set this parameter.

Aliases

DevBaseCompatibility

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DocumentationConflict<DocumentationConflictAction>

Specifies how conflicting lines in documentation triggers are merged. Set this parameter when you are merging objects with the same type of content in the documentation trigger, such as technical descriptions or a version list. The default value is ModifiedFirst. The following options are available:

Strict

Conflicting lines of documentation are reported as conflicts in the same way as all other conflicts. Use this value when the objects contain technical descriptions in the documentation triggers.

ModifiedFirst

Conflicting lines of documentation are merged into the result file with the content from the modified object listed first. Use this value when the objects contain version history in the documentation triggers. This is the default value.

TargetFirst

Conflicting lines of documentation are merged into the result file with the content from the target object listed first. Use this value when the objects contain version history in the documentation triggers.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Forces the cmdlet to overwrite any existing files in the Result folder.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ModifiedProperty<ModifiedPropertyAction>

Specifies the value of the Modified property for the merged application objects. The following options are available:

Yes

In the result of the update, the Modified property is set to Yes.

No

In the result of the update, the Modified property is set to No.

FromTarget

In the result of the update, the Modified property is set to the value from the target application objects. This is the default value.

FromDelta

In the result of the update, the Modified property is set to the value from the delta files.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Specifies if the cmdlet must return a FileInfo object for each merge operation. If you do not set this parameter, the cmdlet returns a list of the files.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ResultPath<String>

Specifies the folder where the updated files must be stored. The folder must already exist.

Aliases

Result

Required?

true

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Strict

Specifies if the cmdlet must report all conflicts, including non-functional conflicts such as the order in which variables or methods are listed in the text files. If this parameter is not set, these conflicts are suppressed to reduce "noise".

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TargetPath<String[]>

Specifies the folder where the application objects are stored that you want to update with the delta.

Aliases

Target

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VersionListProperty<VersionListPropertyAction>

Specifies if you want to update the Version List property for the application objects. The following options are available:

Clear

In the result of the update, the Version List property is empty. This is the default value.

FromTarget

In the result of the update, the Version List property is set to the value from the target application objects.

FromModified

In the result of the update, the Version List property is set to the value from the modified application objects.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None or an object representing the file containing the updated object.

    When you set the -PassThru parameter, the Update-NavApplicationObject cmdlet returns a FileInfo object for each created object file. Otherwise, this cmdlet does not generate any output.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This example updates the text files in the TARGET folder with the delta files in the DELTA folder. The resulting text files are stored in the RESULT folder. When the update completes, a summary is shown.

PS C:\> Update-NAVApplicationObject -TargetPath C:\Solution\TARGET\*.txt -DeltaPath C:\Solution\DELTA\*.txt –ResultPath C:\Solution\RESULT\