3 Replies Latest reply on Apr 28, 2011 2:46 PM by RedL

    script after record has been committed

    RedL

      Title

      script after record has been committed

      Post

      We need to update status by script, after any field has been changed and record has been committed.  The record is on the portal row. We cannot use OnRecordCommit script.  If is pre-script.  Record is not actual saved when OnRecordCommit is executed.  How to trig a script which is after OnRecordCommit?

        • 1. Re: script after record has been committed
          LaRetta_1

          You might consider using an auto-enter calculation on that child table which updates the status.  When you create the auto-enter calculation, uncheck the box which says, 'Do Not Replace Existing Value in field if any'.  In this way, the Status would re-evaluate every time a field used in your auto-enter calculation changes so your Status would stay up to date without script.

          UPDATE:  Unless you mean that the Status field is in the parent record

          • 2. Re: script after record has been committed
            philmodjunk

            To answer the more general question:

            How to trigger a script which is after OnRecordCommit?

            Use OnRecordCommit to run this script:

            If [Not $$TriggersOff ]
               Set Variable [$$TriggersOff ; Value: True ]
               Commit Record
               // put your post commit script steps here
               Set Variable [$$TriggersOff ; Value: False ]
            End If

            This allows you to commit the record in the script without getting enmeshed in an endless series of OnCommit triggers.

            • 3. Re: script after record has been committed
              RedL

              Thanks.  Yes, recursive can achieve it.