Hi, all - I'm back
I've recently made a very cool modification to Dimension handling, whereby the user can go to one dimension group and, for values in that dimension "controlling" group, set defaults for two other dimension groups. Then, when the user changes the value in the "controlling" group, the other two dimension group values are set to the corresponding defaults. It's very cool, if I do say so myself, and all the logic is in Code Unit 408 (except for the table and page, of course).
However, there's an issue with that. When the user is in, say, the Purchase Order Subform, editing the detail lines of the PO, the dimension changes don't show until the page is refreshed.
Now, given that the "path" to my logic is Purchase Order Subform -> Purchase Lines table -> Dimension Management code unit, how do I force the Purchase Order Subform to refresh? I tried "CurrPage.Refresh", but NAV told me that CurrPage didn't exist. I don't want to put the call on the Purchase Order Subform, because I'd then have to modify a bunch of other forms as well, AND remember to add the call to any dimension-aware forms that I make.
So here's my question: when a user goes Page -> Table -> Code Unit, is there a way in the Code Unit to identify the page that's a couple of abstraction layers up?
Answers
http://dynamicsuser.net/blogs/mark_brum ... -page.aspx
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I tried that workaround and got error to the effect that I could not create the automation server. I created the WshShell object as an Automation with a subtype of 'Windows Script Host Object Model'.IWshShell3 - that was the only object that made sense in the context of that page.
Any suggestions?
[edit]
I may have omitted a pertinent detail - I'm developing this on a Windows 8 machine, and it has to work on all current Windows platforms.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I had created the wrong kind of object - initially I'd created an IWshShell3 object. I needed to create a WshShell object instead (no leading "I" or trailing "3"). Once I set the variable to the correct object, it worked like a charm.
I don't suppose there's a way to suppress that "is it okay to use automation?" dialog, is there?