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
Default (Default)
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.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | DateTimePropertyAction |
Default value: | None |
Accepted values: | Now, Clear, FromTarget, FromModified |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | PSPath, Delta |
Parameter sets
(All)
Position: | 2 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | 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.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | DocumentationConflictAction |
Default value: | None |
Accepted values: | Strict, ModifiedFirst, TargetFirst |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Force
Forces the cmdlet to overwrite any existing files in the Result folder.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Legacy
Reduces the scope of the cmdlet. Do not set this parameter.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | DevBaseCompatibility |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | ModifiedPropertyAction |
Default value: | None |
Accepted values: | Yes, No, FromTarget, FromModified |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ResultPath
Specifies the folder where the updated files must be stored. The folder must already exist.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Result |
Parameter sets
(All)
Position: | 3 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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".
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TargetPath
Specifies the folder where the application objects are stored that you want to update with the delta.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Target |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | VersionListPropertyAction |
Default value: | None |
Accepted values: | Clear, FromTarget, FromModified |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
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.