Creating a prompter for certain user

Hi all, I would like to create a prompter to popup a form to inform the HR people on some status regarding the employees confirmation date. How can i do this? And anyone please tell me? Thanks

HI,Ken Yap I think it easy,though Axapta do not provide this function directly,I think we can meet it in another way. I think It is best way create a special group in Axapat instead of a special user,so you can allocate permissions of the special user to the special group.eg. name as HR_Prompter. Then we have to create a prompter form for this special group contains the information of employees confirmation date.And then you can can check it timely or startup if the current user belong to the HR_Prompter. I thik the codes is easy in this way, but if you have any difficulties about code let me konw feel freely. Best Regards& good luck! Andy.Peng Qing Hua.

Hi Andy, Thanks for your reply. Do you have any codes or examples on how i can do this? I’m new to axapta and not yet familar with the coding. Thanks for your help.

HI,Ken Yap Now,I asume you have created a prompter form name as fm_HR_Prompter and you have created a user group name as “HR_Prompter” Then you should embeded the following codes to your start up method to remand the HR user. args args; args parameters=new args(); formRun fm_HR_Prompter; userGroupList userGroupList; ; select groupId from userGroupList where userGroupList.userId == curuserid() && userGrouplist.groupId==‘HR_Prompter’; if (userGroupList.userId!=’’) { parameters.name(FormStr(fm_HR_Prompter)); parameters.caller(this); fm_HR_Prompter=classfactory.formRunClass(parameters); fm_HR_Prompter.init(); fm_HR_Prompter.run(); fm_HR_Prompter.wait(); } Wish the above codes can give you some help. Best Regard & Good Luck! Andy.Peng Qing Hua.

Hi Andy, Sorry, but i just need to clarify something with you before i proceed. For the codes that you gave me, can i put it in the Init method of the form or the Run method. And do i need to create a table for the form? Sorry to trouble you. Thanks in advance.

Hi, Try to write the code in ‘init()’ method. Typically in init() method, before you write your code, you would call the super() method. This super() call is responsible for activities like - - construction of the actual form to be displayed - activation of init() method of data source which in turn activates the query to fetch data from database, etc. You should be able to find detailed info in Developer’s guide. Whether you need to create a table for this - it depends on what info you want to display. Since you want to display status regarding employees confirmation date, I would think a table is not necessary. HTH, Harish Mohanbabu

Hi, I don’t know how much information the popup should keep an if the user should be able to change data or interact in some way. But the easiest way to just display som short information would be a simple box, placed i the run method. Example: public void run() { str info1; str info2; ; info1 = “text 1”; info2 = “text on line 2”; box::info(info1+"\n"+info2); super(); } Replace the static text with your information. Good luck! /Peter Karlsson

Hi,Ken Yes, Peter Karlsson provided a easiest way to attain your requirement. If you olny have simple information to prompt,I recomand you use this way, But if you want to do more complex action or data process please use a form. By the way, In my experience, You can embed you code in init function or run function.

Thanks to all, The customization that i’m doing is for the HR personnel only. The initial idea is to prompt the HR personnel on each login and it should prompt them of any employees whom their confirmation date or retirement date is due. My concern is that if the module will perform a search in the emplTable on each logon, this will be very slow and not really practical as if there are 1000 employees in the company, then the search will be perform everytime a HR logon. Will it be easier to use Class instead?

I dont think prompt shown on each logon is a good idea … yes, you are right it will ber very slow … how about to make a report that shown any employees whom their confirmation date or retirement date is due. i think it’s not difficult either for you or for HR people … everyday they can run that report to get the information. hope it’s help regards, Danang Ismu

Question for Harish. In an earlier post you said:

quote:


Typically in init() method, before you write your code, you would call the super() method. This super() call is responsible for activities like - - construction of the actual form to be displayed - activation of init() method of data source which in turn activates the query to fetch data from database, etc. You should be able to find detailed info in Developer’s guide.


Is the developers guide the X++ Basic guide, the system documentation in the AOT or the Help->developers guide in the Axapta client? Thanks in advance, Simon Batchelder

Thanks all. I’ve finished the customization. I’m using runbasereport to gen a report on the Employees due to confirmation and for those who are going to retire in 6 months.