BMellert
Guru
Registered:1225130168 Posts: 688
Posted 1558012927
Reply with quote
#1
We have functionality that currently uses ShowModalDialog (display a modal window and return values). Since this works only with Internet Explorer, and we need to support other browsers (and IE is on the decline), I am trying to come up with another solution. This is used for a few reasons, but the most is a name-lookup, since multiple drop down on a form with thousands of names makes the payload and performance real slow. windows.open() opens the window fine, though when calling an MBPM admin form at least it's window.opener is not set (null) so I cannot "call back" to the original window. Anybody have a suggestion / solution to be able to open a window (doesn't have to be modal, though would be ideal) without using ShowModalDialog that can return a value as well?
homar
New Member
Registered:1305284975 Posts: 6
Posted 1558100853
Reply with quote
#2
What we do in such scenario:dedicated Admin From Group (let's call it Lookups ) admin form (let's call it LookupForm ) in Lookups group. LookupForm is hidden from 'public' access (we use the dedicated role which checks ProcessContext.UserForm for that) but still can be opened when needed regular form contains button having 'Button action ' set to 'Initiate a process'. Then in 'Process name ' = Lookups and 'Action name ' = LookupForm in 'When button pressed ' script we setup some cookies e.g. field name(s) where the values should be returned to in LookupForm 's 'On form submission ' script we call e.g. window.parent.opener.SetField to send the selected value back to the main window It's only high level description but hope it helps.
BMellert
Guru
Registered:1225130168 Posts: 688
Posted 1558107022
Reply with quote
#3
I am using the admin form approach for our ShowModalDialog solution today, and it works very well -- in IE only. It sounds like I may be able to use a similar solution (though I wish window.open() had a valid modal option) -- but I'll have to figure out how to use cookies. I've never done that before, in particular in context within MBPM. It may be an option though. Thanks! I'll see what I can dig up.
homar
New Member
Registered:1305284975 Posts: 6
Posted 1558107427
Reply with quote
#4
FYI: the solution I described works fine for us also in latest Chrome and Firefox. Let me know if there is anything more I can help.
BMellert
Guru
Registered:1225130168 Posts: 688
Posted 1558112594
Reply with quote
#5
Good to know ... I just have to figure out how to work with cookies since I have never done that before.
homar
New Member
Registered:1305284975 Posts: 6
Posted 1558118604
Reply with quote
#6
I don't have an access to our library where I have an exact code at the moment but afair it was something like that and is working:https://stackoverflow.com/a/24103596
BMellert
Guru
Registered:1225130168 Posts: 688
Posted 1559157658
Reply with quote
#7
Thanks for the feedback. Between this and feedback I received from the OpenText forums, I was able to come up with a working solution.