0

ui.popupRecord() and Ninext

Hi .

I noticed that when Ninext is installed the ui.popupRecord() method no longer works. Do you also have this issue or is it an isolated case?

Thanks!

   Fabio

6 replies

null
    • Ninox developper
    • Jacques_TUR
    • 9 mths ago
    • Reported - view

    Indeed, when Ninext is installed, Ninox requires an additional parameter for openRecord.
    Without Ninext: popupRecord( recordId ),
    With Ninext: popupRecord( databaseId, recordId ).

    ui.popupRecord( database.id, 'A1' );

    The same applies to openRecord and openFullscreen

      • squared_GmbH
      • yesterday
      • Reported - view

       Hi Jacques, may I ask how you managed to overload ui.popupRecord(recordId) with ui.popupRecord(databaseId, recordId)? Is it possible to do this without ninext?

      I'm trying to build a custom HTML table with a button that opens a record from another database. Everything I scripted works inside the same database.

      • Ninox developper
      • Jacques_TUR
      • yesterday
      • Reported - view

       

      It is not Ninext that overrides a Ninox function, but rather the use of a compatibility mode with an earlier version that unprotects Ninox objects. This option is set to disappear, and I encourage you not to build any major or commercial projects based on it.

      To read a record from another database without using Ninext and in a sustainable way, the best approach is to use the Ninox REST API.

      If you wish to do it with Ninext, the best method is to call a Ninox function from JavaScript using the callNinoxFunction function: https://docs.ninext.fr/html-helping-functions-15.
      This will allow you to retrieve data directly from Ninox and ensure that it remains functional over future updates.

      • squared_GmbH
      • yesterday
      • Reported - view

       Thanks for your fast reply. I already thought about the approach via the REST API, but I can't see a way to use it inside HTML / Javascript without publishing the API Key in the sites source code.

      You suggest to use ninext callNinoxFunction inside the HTML and this approach is "safe to use" in regards of upcoming versions of ninox?

    • Sviluppatore Ninox
    • Fabio
    • 9 mths ago
    • Reported - view

    Perfect. Many thanks!

    • Ninox developper
    • Jacques_TUR
    • yesterday
    • Reported - view
     said:
    You suggest to use ninext callNinoxFunction inside the HTML and this approach is "safe to use" in regards of upcoming versions of ninox?

    We are hopeful that this will become the case in the near future, but as of today, I unfortunately cannot certify it.