Documentation

crm.livefeedmessage.add

Starting from CRM version 23.1400.0 this method has been deprecated.

crm.livefeedmessage.add(fields)

Adds a message to the CRM Live feed.

Parameters

Parameter Description
POST_TITLE Message title.
MESSAGE Message text.
SPERM Access rights to view a message, for example:
SPERM": {
"CRMCONTACT": ["CRMCONTACT3", "CRMCONTACT7"], // CRM contacts
"CRMCOMPANY": ["CRMCOMPANY1", "CRMCOMPANY3"], // CRM companies
"CRMDEAL": ["CRMDEAL3", "CRMDEAL5"], // CRM deals
"CRMLEAD": ["CRMLEAD9", "CRMLEAD11"], // CRM leads
"SG": ["SG5", "SG9"], // social network workgroups
"U": ["U1", "U3"], // users
"DR": ["DR1", "DR7"], // divisions with subdepartments
}
ENTITYTYPEID Type of entity (number), in which the message is published:
  • 1 - Lead;
  • 2 - Deal;
  • 3 - Contact;
  • 4 - Company.
ENTITYID ID of specific Lead/Deal/Contact/Company, in which the message is published.

Example

BX24.callMethod(
   "crm.livefeedmessage.add",
   {
      fields:
      {
         "POST_TITLE": "Few words about the service",
         "MESSAGE": "Bitrix24 is created on the basis of Bitrix Framework platform.",
         "SPERM": {
            "CRMCONTACT": ["CRMCONTACT3", "CRMCONTACT7"],
            "CRMCOMPANY": ["CRMCOMPANY1", "CRMCOMPANY3"],
            "CRMDEAL": ["CRMDEAL3", "CRMDEAL5"],
            "CRMLEAD": ["CRMLEAD9", "CRMLEAD11"],
            "SG": ["SG5", "SG9"],
            "U": ["U1", "U3"],
            "DR": ["DR1", "DR7"],
         },
         "ENTITYTYPEID": 3,
         "ENTITYID": 3,
      }
   },
   function(result) 
   {
      if(result.error())
         console.error(result.error());
      else
         console.info("Message with ID is created" + result.data());
   }
);


BX24.callMethod(
	"crm.livefeedmessage.add",
	{
		fields:
		{
			"POST_TITLE": "POST_TITLE",
			"MESSAGE": "MESSAGE",
			"SPERM": {
				"CRMLEAD": ["CRMLEAD9", "CRMLEAD11"],
				"U": ["U1"],
			},
			"ENTITYTYPEID": 1,
			"ENTITYID": 56374,
			"FILES": [
				["1.gif", "R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="],
				["2.gif", "..."]
			],
		}
	},
	function(result)
	{
		if(result.error())
			console.error(result.error());
		else
			console.info("Message with ID is created" + result.data());
	}
); 

Additional information



© «Bitrix24», 2001-2024
Up