First things first I had to create the User Id and press submit, once I did that I wanted the message box to pop up and prompt the supplier if they would like to create another User Id for their company.
This is a custom page created to allow existing Suppliers with-in our system to create a User Id and log into the supplier portal. Once I select the Submit button the message box prompts the user, if they would like to create another user.
Here is the peoplecode, and how it processes upon the selection of the Supplier.
So in this first section you are trapping the &Answer the supplier selects.
Local Any &Answer;
&Answer = MessageBox(%MsgStyle_YesNo, "", 0, 0, "Would you like to create another Supplier ID for your company?");
In this section you are going to evaluate the &Answer and process the information accordingly. The &Answer will be a 6 or 7. If the answer is 6 it will equal Yes, if it is 7 the answer will equal No.
If &Answer = "7" Then
/* Insert the role that allows user access to the portal*/;
SQLExec("INSERT INTO PSROLEUSER (ROLEUSER, ROLENAME, DYNAMIC_SW) VALUES(:1, 'ROLE_NAME', 'Y')", &OPRID);
/* Get the database you are logged into. */;
&DB_ID = Upper(&DB_ID);
/* Evaluate the database and send the user to the correct log in location. */;
/* You will need to create URL definitions for this section. */;
Evaluate &DB_ID
When = "Production"
&URL_ID = GetURL(URL.Production);
%Response.RedirectURL(&URL_ID);;
When = "Fix"
&URL_ID = GetURL(URL.Fix);
%Response.RedirectURL(&URL_ID);
When = "Test"
&URL_ID = GetURL(URL.Test);
%Response.RedirectURL(&URL_ID);;
When = "Development"
&URL_ID = GetURL(URL.Development);
%Response.RedirectURL(&URL_ID);
End-Evaluate;
Else
/* Insert the role that allows user access to the portal*/;
SQLExec("INSERT INTO PSROLEUSER (ROLEUSER, ROLENAME, DYNAMIC_SW) VALUES(:1, 'ROLE_NAME', 'Y')", &OPRID);
/* Clear all fields to allow the user to create additional User Id's for their company */;
SUP_OB_USR_REG.OPRID = " ";
SUP_OB_USR_REG.SUP_OB_OPERPSWD = " ";
SUP_OB_GRP_WRK.SOB_PSWD = " ";
SUP_OB_USR_REG.DESCR = " ";
SUP_USR_REG2.HINT_QUESTION = " ";
SUP_USR_REG2.HINT_RESPONSE = " ";
SUP_OB_USR_REG.EMAILID = " ";
AUC_BID_REG_ITM.AGREE_TO_TERMS = "N";
End-If;
This comment has been removed by a blog administrator.
ReplyDelete