Note entity in Sandbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Enju
    Senior Member
    • Apr 2018
    • 134

    #1

    Note entity in Sandbox

    Hello,
    is possible to test formula for Note entity in Sandbox?
  • Jakub Grufik
    Senior Member
    • Aug 2022
    • 361

    #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
  • rabii
    Active Community Member
    • Jun 2016
    • 1369

    #3
    Originally posted by Enju
    Hello,
    is possible to test formula for Note entity in Sandbox?
    No not possible.
    Rabii
    EspoCRM & Web Dev

    🔗 See what I’ve built for EspoCRM

    Comment

    • Kharg
      Senior Member
      • Jun 2021
      • 482

      #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

      • yuri
        EspoCRM product developer
        • Mar 2014
        • 9597

        #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

        • item
          Active Community Member
          • Mar 2017
          • 1557

          #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);

                  }
          ​ 
          If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

          Comment

          Working...