I forgot.. problem with running forms
dleroux
Member Posts: 87
I'm adding a button to the Sales Order Form (Form 42). WHen pressed, it should open a new custom form giving the details of a workflow process.
In theory, it should work in a similar manner to the infopane buttons that open customer histroy forms or contact lists. But, when I use FORM.RUN variant of the code, the effect seems to be that Form 42 closes and the new form never opens.
If I use Form.RUNMODAL, the Sales Order stays open, but I get an annoying message
"<Sales Order> cannot be closed because it is locked by <Workflow Detail Form>
Please finish <Workflow Detail Form> before closing"
And if I click OK, I get my new form in all it's glory.(I do not think a spurious error message will fly with the customers)
I suspect I am missing something fairly simple (like a form/button property?) but I'm drawing a blank(too long a break from Navision?). Could anyone give me a bonk with ye olde clew-by-four?
Thanks in advance,
BTW I get the same sort of results regardless of how I handle the lead up to trying to run the form (running directly in the onpush event, putting it in a function off the Sales Order Form, or putting it in a separate codeunit. Even defining a variable of type Form and adding the extra level of indirection does not change the behavior
In theory, it should work in a similar manner to the infopane buttons that open customer histroy forms or contact lists. But, when I use FORM.RUN variant of the code, the effect seems to be that Form 42 closes and the new form never opens.
If I use Form.RUNMODAL, the Sales Order stays open, but I get an annoying message
"<Sales Order> cannot be closed because it is locked by <Workflow Detail Form>
Please finish <Workflow Detail Form> before closing"
And if I click OK, I get my new form in all it's glory.(I do not think a spurious error message will fly with the customers)
I suspect I am missing something fairly simple (like a form/button property?) but I'm drawing a blank(too long a break from Navision?). Could anyone give me a bonk with ye olde clew-by-four?
Thanks in advance,
BTW I get the same sort of results regardless of how I handle the lead up to trying to run the form (running directly in the onpush event, putting it in a function off the Sales Order Form, or putting it in a separate codeunit. Even defining a variable of type Form and adding the extra level of indirection does not change the behavior
0
Comments
-
so you've tried adding a Command Button
Changing the properties
PushAction: RunObject
RunObject: Form "Your Form"
RunFormLink: *If needed*0 -
I think that somewhere in there you have a Currentform.close command which you need to remove.
Though Harry's solution is probably better than the one you are trying.[/b]David Singleton0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
