call secondary page for a main page
TRANSCRIPT
-
7/25/2019 Call Secondary Page for a Main Page
1/2
How to call Secondary page for a main page?Pushbutton
PropertiesDoModal
There are two ways to call a secondary page from main page
1) Setting Pushbutton properties
Note: every pushbutton should be associated with field of that page record.
2) Domodal function: The DoModalfunction displays a secondary page. Secondary pages are
modal, meaning that the user must dismiss the secondary page before continuing work in the
page from which the secondary page was called. To use Domodal function set the Destinationas People!ode!ommand" in Pushbutton properties as shown below.
#ote : Domodal is also used to call Standard page. !an use more than one Domodal function
in single e$ent peoplecode to call more than one secondary page.
Syntax
DoModal%P!"#pagename, title, &pos, ypos, [level, scrollpath, target_row')
(ny $ariable declared as a !omponent $ariable will still be defined after using a DoModal
function.
Doodal should not be used in the following peoplecode e$ents:
Sa$eprechange
Sa$epostchange
*orkflow
+owselect
(ny People!ode e$ent that fires as a result of a ScrollSelect, ScrollSelect#ew,
+owScrollSelect or +owScrollSelect#ew function call.
$eturns
+eturns a number that indicates how the secondary page was terminated. ( secondary pagecan be terminated by the user clicking a builtin %&or 'ancelbutton, or by a call to the
"ndModalfunction in a People!ode program. -n either case, the return $alue of DoModalis
one of the following:
1 if the user clicked / in the secondary page, or if 1 was passed in the "ndModal
function call that terminated the secondary page.
0 if the user clicked !ancel in the secondary page, or if 0 was passed in the
"ndModalfunction call that terminated the secondary page.
&le :
-
7/25/2019 Call Secondary Page for a Main Page
2/2
Doodal%P(2.D3!(T-#4DT5, sg2etTe&t%1000, 167, 8ducationDetails 918,
D3!(T#.D2+), 1, 1, 1, +!+D.D3!(T#, !urrent+ow#umber%))
"ndModal (
The ndodal function closes a currently open secondary page. -t is re;uired only for
secondary pages that do not ha$e %& and'ancelbuttons. -f the secondary page has / and!ancel buttons, then the function for e&iting the page is built in and no People!ode is
re;uired.
"xample (
The following statement acts as an / button:
ndodal%1)
The following statement acts as a !ancel button:
ndodal%0)
sModal (
sModalreturns True if e&ecuted from People!ode running in a modal secondary page and