Notifications
Clear all

[Solved] Is there a way to map model to JS page so that model links open this page?

3 Posts
2 Users
4 Reactions
841 Views
2
Topic starter

Model link field usualy opens model detail page in old cc 1 style.
For the most models we implement custom JS pages (e.g. using CRUD framework)

Is there a way to map such a JS page to model so that any model link on any page will open this custom JS page?

3 Answers
2
Topic starter

Yes, the following JavaScript code can be used on the page:

One.PageMgr.regDetail('TMS.SampleModel', 'TMS.SampleModelPanel');

where

  • TMS is the module prefix

  • SampleModel - model level type name

  • TMS.SampleModelPanel - page constructor name

Note that panel should be provided as a string, not function.

0
Topic starter

Yes, the following JavaScript code can be used on the page:

One.PageMgr.regDetail('TMS.SampleModel', 'TMS.SampleModelPanel');

where

  • TMS is the module prefix

  • SampleModel - model level type name

  • TMS.SampleModelPanel - page constructor name

Note that panel should be givean as a string, not function.

0
One.PageMgr.regDetail('ZBKS.Book', 'ZBKS.BookDetail');

 image 1