Home > Forum > Rules, JS, SQL > Info: WEBCON BPS 2023 R2: window.initialModel is gone

Info: WEBCON BPS 2023 R2: window.initialModel is gone
3

MVP

Hi everyone,

maybe someone else is using some internal JavaScript objects and if this is the case, check whether you are using
window.initialModel and make adjustments. In R2 it's gone.

Most of the objects of the initialModel can be accessed via the liteModel.

/api/nav/db/${parameters.dbId}/element/${parameters.instanceId}/desktop

If you have no idea what I'm talking about, than everything is fine. :)

Best regards,
Daniel

MVP
In reply to: Nikolaus Schusser

Hi Daniel!

Thanks for the clarification.

And yes, I will get problems too ;-)

It is always dangerous to use some internal endpoints / variables because the are likely subject of change.

Best regards, Nik

Hi everyone,

in case you are really needing the data from this endpoint, e.g. you can't get the data via a business rule.

You could grab/take a look at:
https://github.com/Daniel-Krueger/webcon_snippets/blob/main/utils/utils.js

and use getLiteModel
https://daniels-notes.de/posts/2023/ux-form-rules-revised#getlitemodel

Best regards,
Daniel