Documentation

crm.invoice.recurring.update

Scope: catalog Permissions to execute: for all

crm.invoice.recurring.update(id, fields)

The method updates existing setting for recurring invoice template.

Parameters

Parameter Description
id Template setting ID for recurring invoice.
fields Set of fields - array("updated field"=>"value"[, ...]) type, where "updated field" can have values returned by the method crm.invoice.recurring.fields.
Note: to find out the required field format, execute the method crm.invoice.recurring.fields to view the retrieved field format.

Example:

  var id = prompt("Enter ID");
   BX24.callMethod(
       "crm.invoice.recurring.update",
       {
           id: id,
           fields:
           {
               "SEND_BILL": "Y",
               "EMAIL_ID": 136,
               "PARAMS": {
                   "MODE": "month",
                   "TYPE": 2,
                   "INTERVAL": 3,
                   "WEEKDAY": "Monday",
                   "NUM_WEEKDAY_IN_MONTH": 4,
                   "DATE_PAY_BEFORE_OFFSET_TYPE": "day",
                   "DATE_PAY_BEFORE_OFFSET_VALUE": 15,
               }
           },
       },
       function(result)
       {
           if(result.error())
               console.error(result.error());
           else
           {
               console.info(result.data());
           }
       }
   );


© «Bitrix24», 2001-2024