CatalogObject.<Catalog name>.SetNewCode

Syntax:

SetNewCode(<CodePrefix>)

Parameters:

<CodePrefix> (optional)

Type: String.
String value of the prefix. If a prefix is specified, the new code will be generated with this prefix.

Description:

Sets new code. If the code contains the numeric part, the new code is automatically set to the next higher value after the current maximum. It determines the current maximum code for the items of this catalog.
If a prefix is passed, the new code is set as follows: the system finds the maximum code with this prefix and selects the next higher value as a new code.

Availability:

Server, thick client, external connection, Mobile application (server).

Note:

Prefixes may be used, if the String code type was set for the catalog in the Configuration Manager.

Example:

Object.SetNewCode("Ent-");

    

1C:Enterprise Developer's Community