Question

Is it possible to make sure a user only can open one instance of a specific form, for instance CustTrans from CustTable? Modal form is not an option. Some sort of Singleton pattern?

Was it helpful?

Solution

You can use the global cache for this, more info on MSDN: http://msdn.microsoft.com/en-us/library/aa891830.aspx. However a lot of the time the use of the global cache is a sign of bad design.

You can use the global cache to implement a singleton pattern as demonstrated here: http://www.axaptapedia.com/Singleton_pattern

Also consider alternative solutions to your problem, for example the one used on inventory journals. When you open the lines for a journal, it is marked as "in use" so no one else can open that particular journal.

Side note: I believe what you are trying to achieve is a bit of an anti-pattern. Dynamics AX uses dynalinks to link forms together. All of this functionality will be lost if you implement this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top