AXForum  
Вернуться   AXForum > Microsoft Dynamics NAV > NAV: Программирование
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.11.2006, 11:39   #1  
iolanna is offline
iolanna
Участник
 
38 / 10 (1) +
Регистрация: 25.10.2006
init
Что означает функция INIT, если можно приведите пример.
Спасибо :blink:
Старый 13.11.2006, 12:01   #2  
Yoil is offline
Yoil
NavAx
NavAx Club
Лучший по профессии 2017
Лучший по профессии 2009
 
1,574 / 70 (6) ++++
Регистрация: 20.11.2002
Адрес: Msk
Цитата:
INIT
Use these functions to initialize a record in a C/SIDE table.

Record.INIT
recordref.INIT
Record

Data type: record

The record you want to initialize. This function assigns default values to each field in the record. The values the system assigns in the record correspond to those defined when the table was created. If no value was assigned when the table was created, the system assigns values based on the data type, as shown in this table:

If the data type is...
The default value is...

Boolean
No

Option
0

Integer
0

Decimal
0.0

Date
0D (Undefined date)

Time
0T (Undefined time)

Code
'' (empty string)

String
'' (empty string)


recordref

Data type: recordref

The recordref that is used to identify the record that you want to initialize

Comments
The system does not initialize primary key or timestamp fields.

After the system executes this function, you can change the values in any or all of the fields before you call the INSERT function to enter the record in the table. Be sure that the fields that make up the primary key contain values that make the total primary key unique. If the primary key is not unique (record already exists), the system rejects the record.

Example
These C/AL examples show how to use the INIT function. Assume that the primary key includes the "No." field:

Scenario 1
Customer.INIT;
Customer."No." := '1120';
Customer.INSERT;

Scenario 2
Customer."No." := '1120';
Customer.INIT;
Customer.INSERT;

Since INIT does not initialize the primary key fields, the order of the statements in situation 1 and 2 is not important. Situation 1 causes the same result as situation 2.
Или нужен перевод?
__________________
"Моей лошадке ядрышком полмордочки снесло..."
А.В.Суворов, письма к дочери
 


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 01:39.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.