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 DoModal function 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 Destination as ‘PeopleCodeCommand’ in Pushbutton properties as
shown below.
Note : Domodal is also used to call
Standard page. Can use more than one
Domodal function in single event peoplecode to call more than one secondary
page.
Syntax
DoModal(PAGE.pagename, title, xpos, ypos, [level,
scrollpath, target_row])
Any variable declared as a Component
variable will still be defined after using a DoModal function.
DoModal should not be
used in the following peoplecode events:
Saveprechange
Savepostchange
Workflow
Rowselect
Any PeopleCode event
that fires as a result of a ScrollSelect, ScrollSelectNew, RowScrollSelect or
RowScrollSelectNew function call.
Returns
Returns a number that indicates how
the secondary page was terminated. A secondary page can be terminated by the
user clicking a built-in OK or Cancel button, or by a call to the
EndModal function in a PeopleCode program. In either case, the return
value of DoModal is one of the following:
- 1 if the user clicked OK in the secondary page, or if 1 was passed in the EndModal function call that terminated the secondary page.
- 0 if the user clicked Cancel in the secondary page, or if 0 was passed in the EndModal function call that terminated the secondary page.
Example :
DoModal(PAGE.EDUCATION_DTL,
MsgGetText(1000, 167, "EducationDetails - %1", EDUCATN.DEGREE), - 1,
- 1, 1, RECORD.EDUCATN, CurrentRowNumber());
EndModal
:
The EndModal function closes a
currently open secondary page. It is required only for secondary pages that do
not have OK and Cancel buttons. If the secondary page has OK and
Cancel buttons, then the function for exiting the page is built in and no
PeopleCode is required.
Example :
The following statement acts as an
OK button:
EndModal(1);
The following statement acts as a
Cancel button:
EndModal(0);
IsModal :
IsModal returns True if executed from PeopleCode running in a modal
secondary page and False if executed elsewhere. This function is useful in separating
secondary page-specific logic from general PeopleCode logic.
Example
If Not IsModal() Or
Not (%Page = PAGE.PAY_OL_REV_RUNCTL Or %Page = PAGE.PAY_OL_RE_ASSGN_C Or %Page = PAGE.PAY_OL_RE_ASSGN_S) Then
Not (%Page = PAGE.PAY_OL_REV_RUNCTL Or %Page = PAGE.PAY_OL_RE_ASSGN_C Or %Page = PAGE.PAY_OL_RE_ASSGN_S) Then
Evaluate
COUNTRY
When = "USA"
When = "CAN"
If Not AllOrNone(ADDRESS1, CITY, STATE) Then
Warning MsgGet(1000, 5,"Address should consist of at least Street (Line 1), City, State, and Country.")
End-If;
Break;
When = "USA"
When = "CAN"
If Not AllOrNone(ADDRESS1, CITY, STATE) Then
Warning MsgGet(1000, 5,"Address should consist of at least Street (Line 1), City, State, and Country.")
End-If;
Break;
When-Other;
If Not AllOrNone(ADDRESS1, CITY, COUNTRY) Then
Warning MsgGet(1000, 6, "Address should consist of at least Street (Line 1), City, and Country.")
End-If;
End-Evaluate;
End-If;
If Not AllOrNone(ADDRESS1, CITY, COUNTRY) Then
Warning MsgGet(1000, 6, "Address should consist of at least Street (Line 1), City, and Country.")
End-If;
End-Evaluate;
End-If;
wow that was a great synopsis
ReplyDeleteHey Hi Ismail,
ReplyDeletethat was nice context, one doubt what if i need to disable only OK/Cancel Button on secondary page without using our customized buttons.
Watch the numbers drop and the excitement soar with Live Lottery access on KhelRaja. Our integrated feature delivers high-definition streams of official draws, guaranteeing a transparent and immersive gaming experience from the comfort of your home. We eliminate any doubt by showing you the draw as it happens, reinforcing our commitment to fair play. As a leading money-making gaming platform, KhelRaja ensures that the thrill of a Live Lottery is always just a click away. Tune in and witness your winning moment!
ReplyDeleteMSME Registration, also known as Udyam Registration, is an official recognition given to Micro, Small, and Medium Enterprises in India. It helps businesses access government benefits like subsidies, cheaper loans, protection against late payments, and easy approval for licenses or tenders. Taxlegit assists entrepreneurs in completing the What Is MSME Registration quickly by preparing documents, verifying details, and submitting the application accurately. Whether you run a manufacturing or service-based business, MSME registration boosts credibility and supports growth. With Taxlegit, the process becomes effortless, helping you unlock all benefits available under the MSME scheme.
ReplyDeleteNGO Experts made the process to register NGO simple and stress-free. Their team explained each step clearly, handled documentation carefully, and ensured timely completion. I appreciated their professional approach and quick responses. A reliable company for anyone planning to start an NGO with proper legal guidance and support.
ReplyDelete