Do you have an example how we can create an entry (with links etc) in the stream from JS and PHP?
Announcement
Collapse
No announcement yet.
Creating an entry in stream?
Collapse
X
-
Hello,
in the stream you can create post only (Note). If you need to create other entity, you can do it with Quick Create button (+ on the top of the page)
What is the use case of creating another records, except Notes, in Stream? Maybe better to use other panels for this?
-
Hi I have a sample exemple but I have not understand all field : if @tanya can explain what is these field :
data {} = sample ?
type = Post , ? other type ?
target_type = ?
isGobal = ? for ?
isInternal = ? for users only ?
$entityManager = $this->getEntityManager();
$note = $entityManager->getEntity('Note');
$note->set(array(
'deleted' => 0,
'post' => $fileName ." @" .$coUserName,
'data' => '{}',
'type' => 'Post',
'target_type' => null,
'isGlobal' => 0,
'isInternal' => 0,
'parentId' => $contactId ,
'parentType' => 'Contact',
'relatedId' => null,
'relatedType' => null,
'createdById' => null,
'superParentId' => null,
'superParentType' => null,
));
$noteId = $entityManager->saveEntity($note);
Comment
-
Originally posted by tanya View PostHello,
in the stream you can create post only (Note). If you need to create other entity, you can do it with Quick Create button (+ on the top of the page)
What is the use case of creating another records, except Notes, in Stream? Maybe better to use other panels for this?
Comment
Comment