Announcement

Collapse
No announcement yet.

Note entity in Sandbox

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

  • Note entity in Sandbox

    Hello,
    is possible to test formula for Note entity in Sandbox?

  • #2
    Hello what do you mean by "Note entity" I do not see the type of entity "Note"

    Comment


    • rabii
      rabii commented
      Editing a comment
      Note is represented in the system as stream / post.

    • Jakub Grufik
      Jakub Grufik commented
      Editing a comment
      aha, thanks for the clarification

  • #3
    Originally posted by Enju View Post
    Hello,
    is possible to test formula for Note entity in Sandbox?
    No not possible.

    Comment


    • #4
      You actually have 2 options

      (not recommend)
      Create a new file in Custom\Resources\metadata\scopes

      Note.json
      PHP Code:
      {
      "object"true
      }​ 
      then rebuild and will you have the note entity selectable in the formula sandbox.

      Or just use the browser inspect element to change the data-value of another entity to "Note".

      Comment


      • #5
        I don't remember any place in Espo that allows applying a formula script to an existing note entity. Maybe you don't need it? You can utilize record\ functions.

        Comment


        • #6
          Hello,
          Note entity is very usefull for us for send Sms.
          Just a idea .. very simple

          PHP Code:
          if ( $entity->isNew() && substr($entity->get('post'), 04) == '#Sms' )
                  {
                      
          $parentEntity $this->em->getRDBRepository($entity->get('parentType'))
                              ->
          where([
                                  
          'id' => $entity->get('parentId'),
                              ])
                              ->
          findOne();
                      
          $toNumber $parentEntity->get('phoneNumber');
                      
          $sms $this->createSms($this->user$entity->get('post'), $toNumber);
                      
          $this->smsSender->send($sms);

                  }
          ​ 

          Comment

          Working...
          X