Announcement

Collapse
No announcement yet.

Creating an entry in stream?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating an entry in stream?

    Do you have an example how we can create an entry (with links etc) in the stream from JS and PHP?

  • #2
    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?

    Comment


    • #3
      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


      • #4
        Originally posted by tanya View Post
        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?
        A note is fine if I can add a link to a Contact there or Lead etc. So how to do that from JS or PHP?

        Comment

        Working...
        X