Without using Process Flow, is there a way to execute some sort of script that when a user adds a record on RQ10, that I could take the form Req Number generated by the add, and then populate that value into PO User Field 5 and then execute a change request to save the update?
I know I can use lawForm.getDataValue("RQH-REQ-NUMBER"); and I'm fairly certain I can figure out how to set the RQH-PO-USER-FLD-5 (whatever the command is) to that value. Just not sure how to execute it on add or how to save the update.
I'm fairly certain this is easy to do in process flow, and this seems like a process flow function to me, but I guess they want to try to do it without Process Flow since they are having some kind of unknown problems with it I guess (I dunno my boss didn't quite make that clear to me).
Thanks,
Posted By Queue on 01/19/2010 11:14 AM Without using Process Flow, is there a way to execute some sort of script that when a user adds a record on RQ10, that I could take the form Req Number generated by the add, and then populate that value into PO User Field 5 and then execute a change request to save the update? I know I can use lawForm.getDataValue("RQH-REQ-NUMBER"); and I'm fairly certain I can figure out how to set the RQH-PO-USER-FLD-5 (whatever the command is) to that value. Just not sure how to execute it on add or how to save the update. I'm fairly certain this is easy to do in process flow, and this seems like a process flow function to me, but I guess they want to try to do it without Process Flow since they are having some kind of unknown problems with it I guess (I dunno my boss didn't quite make that clear to me). Thanks,
This is the ideal usage of a user exit.
function FORM_OnAfterTransaction()
{
var sMsg = lawForm.getStatusMessage()
if (sMsg=="Add, complete continue")
--run script--
}
You may want to use a user exit instead as John suggested. Especially if you are using RSS. If you do a design studio form this functionality will not port over to RSS even though RQ10 is the form called within it.
A user exit is "black box" coding you can tack on to any on-line form. There are three types Begin, Middle and End. The end user exit is where you put your logic after the Add, Change, Delete was successful. It is COBOL, it has a set name requirement (ie HR11 End user exit Procedure Division is HR11EPD) and has to be compile seperate to and before the main form (with -u option).
The nice part about user exists is when you do an app upgrade, as long as the field names are still defined on the screen that you use in a user exit, you do not "lose" the code because they don't get overwritten on upgrades.