Bitrix24 REST API

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

<script type="text/javascript">
	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>

User comments

Comments by users are not official documentation. Responsibility for use of the comments are born by users themselves.

The user comments section is not intended as a request box or training area, but rather for specific usage examples. For more general inquiries, please refer to link.

Comments may be added only by registered users and appear after moderation.
© 2001-2017 Bitrix, Inc. Bitrix® is a registered trademark of Bitrix, Inc. Powered by Bitrix Site Manager