crm.deal.productrows.set
crm.deal.productrows.set(id, rows)
Creates or updates product entries inside the specified deal.
Parameters
Parameter | Description |
---|---|
id | Specifies the deal ID. |
rows | Specifies an array of the products to update or create. Each "field" (see the example below) can be one of the fields returned by crm.productrow.fields.
All the matching product entries that exist when calling the method will be updated with new data. Once the deal is saved, the deal amount is auto calculated. |
Example
var id = prompt("Enter the deal ID"); BX24.callMethod( "crm.deal.productrows.set", { id: id, rows: [ { "PRODUCT_ID": 689, "PRICE": 100.00, "QUANTITY": 4 }, { "PRODUCT_ID": 690, "PRICE": 400.00, "QUANTITY": 1 } ] }, function(result) { if(result.error()) console.error(result.error()); else console.info(result.data()); } ); </script>
© «Bitrix Inc.»,
2001-2021,
«Bitrix Inc.», 2021
User Comments
User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.