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
1
Comments
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,
Lils