Documentation

CheckFields

Description and parameters

bool CPrice::CheckFields(
 string ACTION,
 array &arFields,
 int ID = 0
);

Method checks (and modifies) array with price data before writing into table or update. Called in methods CPrice::Add[/link and [link=506431]CPrice::Update. Non-static method.

Call parameters

ParameterDescription
ACTION Specifies which method is being checked. Possible values ():
arFields Associative array with price parameters. Passed via link, array contents can change after calling the method. Permissible keys:
  • PRODUCT_ID - product ID;
  • CATALOG_GROUP_ID - price type ID;
  • CURRENCY - price currency.
ID Price ID. Parameter is optional and is applicable to $ACTION = 'UPDATE' only.

Returned value

On successfully passed parameters, returns true, otherwise - false. If method has returned false, record won't be added/saved and via $APPLICATION->GetException() you can get error text.



© «Bitrix24», 2001-2024
Up