PAGE.RUNMODAL Error, but so not understand why...

Lilithyan
Member Posts: 32
Hello everybody,
I've got a Problem with the PAGE.RUNMODAL function and do not understand why. I hope someone can help me understand.
A customer wants a Wizard-Page (or Navigation-Page, as NAV descriptes it in the page properties), when creating a new Record through an Action. So I went and used the page 5077 (Create Interaction) as a base and the wizard-functions (Startwizard, FinishWizard, etc.) from the table 5077 (Segment Line) which is also the source table in the page. Now in the Standard in the Startwizard function, they make an INSERT on the Segment Line Record NAV is currently Standing on and immediatly uses the PAGE.RUNMODAL function, without using a COMMIT in between:
Funktion StartWizard in table 5077
INSERT;
PAGE.RUNMODAL(PAGE::"Create Interaction",Rec,"Interaction Template Code");
Now, when using the same or rather very similar methos for my code I get the usual write-transaction error for RUNMODAL. The onyl real differences I can see is that my code uses INSERT(TRUE) and the INSERT-Trigger has a LOCKTABLE. But only using INSERT; or takeing out the LOCKTABLE doesn't help at all, the error still occurs.
Just what is the secret behind the Segment Line that ist can use the above mentiones two lines of code without a COMMIT inbetween???
I would greatly appreciate any help you can give me.
Thanks in advance!
Ciao,
Lils
I've got a Problem with the PAGE.RUNMODAL function and do not understand why. I hope someone can help me understand.
A customer wants a Wizard-Page (or Navigation-Page, as NAV descriptes it in the page properties), when creating a new Record through an Action. So I went and used the page 5077 (Create Interaction) as a base and the wizard-functions (Startwizard, FinishWizard, etc.) from the table 5077 (Segment Line) which is also the source table in the page. Now in the Standard in the Startwizard function, they make an INSERT on the Segment Line Record NAV is currently Standing on and immediatly uses the PAGE.RUNMODAL function, without using a COMMIT in between:
Funktion StartWizard in table 5077
INSERT;
PAGE.RUNMODAL(PAGE::"Create Interaction",Rec,"Interaction Template Code");
Now, when using the same or rather very similar methos for my code I get the usual write-transaction error for RUNMODAL. The onyl real differences I can see is that my code uses INSERT(TRUE) and the INSERT-Trigger has a LOCKTABLE. But only using INSERT; or takeing out the LOCKTABLE doesn't help at all, the error still occurs.
Just what is the secret behind the Segment Line that ist can use the above mentiones two lines of code without a COMMIT inbetween???
I would greatly appreciate any help you can give me.
Thanks in advance!
Ciao,
Lils
1
Comments
-
Found it!
Or rather, a collegue of mine found it. The standard uses a temporary record for the INSERT. That's why you can use a RUNMODAL.
Ciao,
Lils0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions