You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

regarding the ok cancel buttons in winmessage.

8 replies [Last post]
Guest's picture
Guest

Hi All.
Iam having a question on winmessage as follows,
In employee self services am having benefits folder in that am having few componenets. If we press on this components, search page is disabled and it opens directly user page. but the user page is taking almost one min to display, untill that it is showing white screen wiht out indicating any thing like processing blink at the ringt top of the page. it is confusing the users, weather the page is working or not. so for this i displayed a winmessage as follows
If %Component = Component.BENEFITS_SUMM_CAN Then
WinMessage("Page is Processing, please press OK to continue.", 1);
End-If;
it is displaying both ok and cancel button. if user press ok button it going to the user page after one min, even if he press cancel button also it is going to the user page. but he want to go to the benefits folder if cancel is pressed.

please help me on this.
sam

Lepa's picture
User offline. Last seen 1 year 24 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: regarding the ok cancel buttons in winmessage.

Note: The WinMessage function is supported for compatibility with previous releases of PeopleTools. New applications should use MessageBox instead. BUT below is a code example if you still want to use it.

/* Displays ok/cancel buttons in message box.  */
&RESULT = WinMessage("Page is Processing, please press OK to continue.", 1);
if &RESULT = %MsgResult_OK then
   /* OK button was pressed -- do ok button stuff */
else
   /* Cancel button was pressed -- do cancel button stuff */
end-if;

You can take a look at this post to see how to send a user to a folder.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Nitin's picture
User offline. Last seen 4 years 47 weeks ago. Offline
Joined: 06/30/2008
Posts: 73
Re: regarding the ok cancel buttons in winmessage.

Try this logic.
In SaveEdit use Winmessage/MessageBox and take user opinion.
Based on the opinion proceed further if you want or use Transfer() to send it the other place

Cheers
Nitin

Guest's picture
Guest (not verified)
Re: regarding the ok cancel buttons in winmessage.

HI Lepa,

Thanks for the reply, actually i wrote the peoplecode in searchinit event.
can we use this NavPageURL function in this event. is that built in function.

Guest's picture
Guest (not verified)
Re: regarding the ok cancel buttons in winmessage.

Hi Nitin,

Thanks for the reply, here am writing the code in search record. is it not possible to get solution in search record.

Lepa's picture
User offline. Last seen 1 year 24 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: regarding the ok cancel buttons in winmessage.

Yes the NavPageURL is a delivered PeopleSoft function.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Nitin's picture
User offline. Last seen 4 years 47 weeks ago. Offline
Joined: 06/30/2008
Posts: 73
Re: regarding the ok cancel buttons in winmessage.

You can write the code on SearchSave. This is the event for Validation of Search fields
so I think you can use this..
Do post the solution which works for you..

Cheers
Nitin

Guest's picture
Guest (not verified)
Re: regarding the ok cancel buttons in winmessage.

Thanks Lepa,

The Code is working when placed in searchinit event. now i can go back to the folder

once again thanks for the solution.

regards
sam

Guest's picture
Guest (not verified)
Re: regarding the ok cancel buttons in winmessage.

Hi Nitin,

the solution for the above question is
Declare Function GetnavPageURL PeopleCode PTPP_SCRTN_WRK.FUNCLIB FieldFormula;

If %Component = Component.BENEFITS_SUMM_CAN Then
&Result = WinMessage("Page is Processing, please press OK to continue.", 1);
If &Result = %MsgResult_OK Then

Else
&URL = GetnavPageURL("HC_BENEFITS_ESS", "", "DFAN");

If All(&URL) Then
%Response.RedirectURL(&URL);
End-If;
End-If;
End-If;