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

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

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.

Examples

EXAMPLE 1

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

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.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DateTimeProperty

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 Time properties are set to the current date and time.

Clear

In the result of the update, the Date and Time properties are empty.

FromTarget

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

FromDelta

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

Type:DateTimePropertyAction
Accepted values:Now, Clear, FromTarget, FromModified
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeltaPath

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.

Type:String[]
Aliases:PSPath, Delta
Position:2
Default value:None
Required:True
Accept pipeline input:True
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.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DocumentationConflict

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.

Type:DocumentationConflictAction
Accepted values:Strict, ModifiedFirst, TargetFirst
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Legacy

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

Type:SwitchParameter
Aliases:DevBaseCompatibility
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ModifiedProperty

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.

Type:ModifiedPropertyAction
Accepted values:Yes, No, FromTarget, FromModified
Position:Named
Default value:None
Required:False
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.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResultPath

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

Type:String
Aliases:Result
Position:3
Default value:None
Required:True
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".

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetPath

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

Type:String[]
Aliases:Target
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VersionListProperty

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.

Type:VersionListPropertyAction
Accepted values:Clear, FromTarget, FromModified
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

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.