objectId must be a GUID and objectType is required. When objectType is workitem or case, the proxy resolves the stream channel from that runtime object rather than trusting caller-provided channel fields. @type defaults to share, publishedAt defaults to the current server time, and caller-provided rootId, parentId, and channelId fields are discarded.
$ActivityStream.Post({objectId:$Xml.Evaluate('Id'),objectType:'customer',content:'Customer '+$Xml.Evaluate('Name')+' is updated.'});
Creating an activity to display only to administrators¶
123456
$ActivityStream.Post({objectId:$Xml.Evaluate('Id'),objectType:'customer',content:'Customer is updated.',targets:[$Membership.Administrator.Id]});
Create a new activity to display only to administrators and accounting, and notify accounting specifically¶
123456789
$ActivityStream.Post({objectId:$Xml.Evaluate('Id'),objectType:'customer',content:'Customer is updated.',targets:[{targetId:$Membership.Administrator.Id},{targetId:$Membership.FindIdentity('Accounting').Id,notify:true}]});
$ActivityStream.Post({objectId:$Xml.Evaluate('Id'),objectType:'customer',content:'Customer is updated.',targets:[{targetId:$Membership.Administrator.Id}],attachment:[$Xml.Evaluate('BillFileId')]});