6 Replies Latest reply on Feb 20, 2013 7:06 AM by philmodjunk

    Get recordID from Portal



      Get recordID from Portal


           Hi All

           I want to get the record ID from a record i'm adding into a portal. The recordID is visible in the portal fields as a merge field but I want to use the value elsewhere in a variable as its saved. I've tried using the portals OnOnjectSave and OnObjectExit but they both look for the recordID to early. My script simply sets the variable using the table field then add it into a Custom Dialogue. As the portal row save the Dialgue does not comain the value, I close the dialogue, the portal refreshes and the new RecordID is displayed using the Merge Field. How can I catch the new record ID earlier?





        • 1. Re: Get recordID from Portal

               How is the RecordID field defined? How does it assign a value to the new record? If it's a serial number field, does it assign the value "on Creation" or "on Commit"?

          • 2. Re: Get recordID from Portal

                 Hi PhilModJunk

                 It uses an External Data Source?



            • 3. Re: Get recordID from Portal

                   Fields do not contain values until that field has been "committed".  The RecordID from an external source will not update until the whole record has been updated.  Otherwise the external source has control of the portal record.


              • 4. Re: Get recordID from Portal

                     What external source? Knowing that may make it possible to suggest a way to get this to work. On the other hand OnObjectSave--selected for the Portal rather than a field in the portal, may succeed in capturing the data you are trying to capture.

                • 5. Re: Get recordID from Portal
                  Hi PhilModJunk Sorry I clicked best answer by accident. Its a sql server connected with an ODBC driver. I tried the onObjectSave in the portal but it doesn't contain the recordID value? Thanks Leonaisse
                  • 6. Re: Get recordID from Portal

                         Are you creating a record in the portal row manually and then the trigger controlled script is unable to set a variable from a field in the (externally sourced) portal table?

                         If so, try:

                         Set Variable [$Row ; value: Get ( CurrentPortalRowNumber ) ]
                         Commit Records[]
                         Go to Object ["Your Portal's object Name here"]
                         Go to Portal Row [no dialog ; $Row ]
                         Set Variable [$RecordID ; value.....

                         You should use the Name box in the inspector's position tab to give your portal an object name before trying out this script.