Formula not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhilash.kumar.niit
    Senior Member
    • Sep 2024
    • 107

    #1

    Formula not working

    Hi i am importing the case using the below code and this is working fine but the only issue i am facing is there are some formula written on the case object which is not triggering after imort.
    this is the code i am using inside the job to save the Case data.
    $entityManager->saveEntity($caseEntity);

  • lazovic
    Super Moderator
    • Jan 2022
    • 1012

    #2
    Hi abhilash.kumar.niit,

    If you are importing data via the default UI and want a hook, formula script, workflow, or flowchart to fire, please try unchecking the Silent Mode box at the first step of import and try again.

    Comment

    • abhilash.kumar.niit
      Senior Member
      • Sep 2024
      • 107

      #3
      Hi lazovic,

      i am not importing via UI i have written a custom code in job which executes every hour and creates record. is there a way to trigger formula while saving/updating the record?

      Comment

      • lazovic
        Super Moderator
        • Jan 2022
        • 1012

        #4
        abhilash.kumar.niit,

        Does the formula script work if you create or save a record directly in the EspoCRM user interface manually?

        Comment


        • abhilash.kumar.niit
          abhilash.kumar.niit commented
          Editing a comment
          Yes, it is working fine. Even when i click the re calculate formula button it works.
      • lazovic
        Super Moderator
        • Jan 2022
        • 1012

        #5
        abhilash.kumar.niit,

        The formula script will be triggered in the following cases:
        • When a record is created or updated via the UI (e.g., the user fills out a form).
        • When a record is created or updated via the REST API.
        • When using workflows, if they create or update a record.
        I'm not sure I can suggest exact changes to the code so that the formula script runs after some hook or job on the backend is executed.

        Comment

        Working...