Bitrix24 REST API

crm.lead.productrows.set

crm.lead.productrows.set(id, rows)

Creates or updates products for the specified lead.

Parameters

Parameter Description
id Specifies the lead ID.
rows An array in format array("field"=>"value"[, ...]) containing values for the new or existing products that need to be created or updated, respectively. The fields can be one or more of those returned by crm.productrow.fields.

This method will replace all the existing product with new values. Once lead data is updated and saved, the lead totals will be recalculated.

Example

<script type="text/javascript">
	var id = prompt("Enter ID");
		BX24.callMethod(
			"crm.lead.productrows.set", 
			{ 
				id: id, 
				rows:
				[ 
					{ "PRODUCT_ID": 689, "PRICE": 100.00, "QUANTITY": 2 }, 
					{ "PRODUCT_ID": 690, "PRICE": 200.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