So I was working on the eSupplier portal and I had a request for an enhancement to the Bidder Approval process. Before a bidder can access the eSupplier Portal they must first be approved by an Approver in the Procurement Department once this happens a user is granted roles to allow the user access to the eSupplier Portal. First I came up with adding a SQLExec statement placed in the correct location will insert the role and everything would be great, well maybe not.
As it turns out that a bidder when registering can add multiple users to the bidder profile and there is the issue. SQLExec only updates one row, the first row returned. With the following code I was able to update all of the users once the Approver from the Procurement Department clicked the Approval push button.
/* Adding Custom Role for bidder access */
Local SQL &SQL;
Local string &OPRID;
Local string &BIDDER_ID;
/* &RoleGrntOprid is the variable used during the processing of the program*/
&OPRID = &RoleGrntOprid;
/* Select Bidder ID of the Users we want to Insert the Role for*/
SQLExec("Select BIDDER_ID FROM PSOPRALIAS WHERE OPRID = :1", &OPRID, &BIDDER_ID);
/* Select Operator Id's associated with the Bidder ID*/
&SQL = CreateSQL("Select OPRID FROM PSOPRALIAS WHERE BIDDER_ID = :1", &BIDDER_ID);
/*While I have Operator Id's associated with the Bidder Id Insert the row*/
While &SQL.Fetch(&OPRID)
SQLExec("INSERT INTO PSROLEUSER (ROLEUSER, ROLENAME, DYNAMIC_SW) VALUES(:1, 'BIDDER_ACCESS', 'Y')", &OPRID);
End-While;
And this is how I solved the issue of inserting roles for multiple users associated with a Bidder Id.
Friday, March 23, 2018
Subscribe to:
Post Comments (Atom)
8 Steps To Building an Application in PeopleSoft
Designing the Application: This is the most important step in creating an application; most of the time in creating an applicat...
-
Designing the Application: This is the most important step in creating an application; most of the time in creating an applicat...
-
So the question came up last week, can we create a Yes / No message box with-in the Supplier On-Boarding process to add addition...
-
/*-- Create an outbound email object --*/ Local PT_MCF_MAIL:MCFOutboundEmail &eMail = create PT_MCF_MAIL:MCFO...
No comments:
Post a Comment