Documentation

crm.lead.list

Returns a list of leads selected by the filter specified as the parameter. See the example for the filter notation.

Parameters

See the list method reference for the parameters.

Example

<script type="text/javascript">
    // Find unconverted leads whose opportunity value is over zero
		BX24.callMethod(
			"crm.lead.list", 
			{ 
				order: { "STATUS_ID": "ASC" },
				filter: { ">OPPORTUNITY": 0, "!STATUS_ID": "CONVERTED" },
				select: [ "ID", "TITLE", "STATUS_ID", "OPPORTUNITY", "CURRENCY_ID" ]
			}, 
			function(result) 
			{
				if(result.error())
					console.error(result.error());
				else
				{
					console.dir(result.data());			
					if(result.more())
						result.next();						
				}
			}
		);
    // Find lead by phone number
		BX24.callMethod(
			"crm.lead.list", 
			{ 
				filter: { "PHONE": "555888" },
				select: [ "ID", "TITLE" ]
			}, 
			function(result) 
			{
				if(result.error())
					console.error(result.error());
				else
				{
					console.dir(result.data());			
					if(result.more())
						result.next();						
				}
			}
		);	
</script>


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.
© «Bitrix Inc.», 2001-2017, «Bitrix Inc.», 2017