Formula script not invoked

Collapse
X
Collapse
+ More Options
Posts
 
  • Time
  • Show
Clear All
new posts
  • agri
    Member
    • Mar 2021
    • 98

    #1

    Formula script not invoked

    Even very simple Formula Script statements show no effect at all (Before save custom script). Seems, Formula Script is not invoked when saving an entity.

    Example:
    There is an entity with a VarChar field named test.I set test to "xxx" and save. Formula Script is:
    entity\clearAttribute('test')
    entity\setAttribute('test', 'abc')

    I change some fields content, so I can again save the record. Afer save, nothing has changed. test still is "xxx".


    There is only one extension. Same behaviour, if extension ist uninstalled.

    Puzzled
    agri

    Addendum: seems to apply to only one entity. But works on this same entity with Formula Sandbox.
    Last edited by agri; 04-14-2025, 02:12 PM.
  • lazovic
    Super Moderator
    • Jan 2022
    • 948

    #2
    Hi agri,

    Can't reproduce on EspoCRM v9.0.8. Please try to use the following formula script (semicolons included):
    Code:
    entity\clearAttribute('test');
    entity\setAttribute('test', 'abc');

    Comment

    • agri
      Member
      • Mar 2021
      • 98

      #3
      It's the ";", that does the trick. Shame on me!

      Comment

      Working...