Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
User Experience
Lawson Design Studio
Trigger PFI from Submit button on LM199
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Jeovanni
Past 24 Hours:
0
Prev. 24 Hours:
1
Overall:
5287
People Online:
Visitors:
556
Members:
0
Total:
556
Online Now:
New Topics
S3 Customization/Development
Data / List view on Lawson Portal
5/21/2025 2:37 AM
Client is on S3 V10. All delivered and custom form
Lawson S3 Financials
Applying credits to open AP invoices
4/28/2025 1:26 PM
Hello, I am new to the Lawson system and after ru
Lawson S3 Financials
Lawson APIA
4/28/2025 1:22 PM
Has anybody recently installed Lawson's APIA m
Lawson S3 Procurement
Tolerance Settings
3/31/2025 2:01 PM
I've been trying to set a tolerance for some t
Dealing with Lawson / Infor
Printing Solutions other than MHC
3/27/2025 1:00 PM
What are others using for printing solutions besid
Lawson S3 Procurement
Green check marks in Lawson 9.0.1
3/20/2025 4:55 PM
Hi, How to remove green check mark on items when o
Lawson S3 HR/Payroll/Benefits
Pay Rate History to Show All Positions
2/26/2025 3:34 PM
Does anyone know how to modify payratehistory.htm
Infor CloudSuite
How to build a Pre-Prod tenant
2/7/2025 1:28 AM
After we finished our implementation and ended our
Lawson S3 Procurement
Browser issue with RQC Shopping
1/28/2025 5:49 PM
Since the recent Chrome/Edge updates, our RQC shop
Lawson S3 Procurement
S3-Procurement New Company
1/22/2025 10:38 PM
My Accounting Department has created a new Company
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1377
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
User Experience
Lawson Design Studio
Trigger PFI from Submit button on LM199
Please
login
to post a reply.
16 Replies
0
Subscribed to this topic
12 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
amylynanderson
Advanced Member
Posts: 26
10/27/2010 6:29 PM
I am trying to use java to do this.
I cannot find a variable that is unique enough to say it is a submit.
The message on all transactions is submit
The fc code is not set for a button.
I know my ags call works but I only want it to happen when they submit the job.
Any suggestions, Amy
David Williams
Veteran Member
Posts: 1127
10/27/2010 6:38 PM
Split
Do you have Design Studio? If so, replace the Submit function with a function that will trigger ProcessFlow (using an AGS call to WFWK.1). The flow could run the job (pass userid and jobname to the flow) and then do whatever else you need the flow to do once the job is done.
amylynanderson
Advanced Member
Posts: 26
10/27/2010 6:49 PM
Split
I have Design Studio that is what I was trying to write the java script in as FORM_OnAfterTransaction.
When you say replace the submit function do you mean replace the action on the properties button?
What would I replace it with? Why Type of function? Currently has FC=S which I have not clue why I cannot address the field.
Thanks Amy
David Williams
Veteran Member
Posts: 1127
10/27/2010 7:26 PM
Split
Replace the FC=S with the Function you developed to trigger the flow.
amylynanderson
Advanced Member
Posts: 26
10/28/2010 10:59 AM
Split
function FORM_OnBeforeTransaction(fc)
{
// was the transaction successful?
if (formState.agsError) return;
// following an submit transaction, trigger flow
if (fc == "S")
{
var vMessage="Lease PFI was Triggered";
alert(vMessage);
var s = portalWnd.AGSPath+"?_PDL="+
"FOCUSQA&_TKN=WFWK.1&_EVT=ADD&_RTN=DATA&_LFN=ALL&_TDS=IGNORE"+
"&FC=A&SERVICE=LMEXPIRING&WORK-TITLE=LM199TriggerLMEXPIRING"+
"&_DELIM=%09&_OUT=XML&_EOT=TRUE";
portalWnd.httpRequest(s);
}
return true;
}
FORM_OnBeforeTransaction()
or
FORM_OnBeforeTransaction(fc)
error on page
amylynanderson
Advanced Member
Posts: 26
10/28/2010 11:06 AM
Split
My main problem here too is FC is not initialized. If I leave FC out completely it will execute everytime even it they inquire.
I have a word doc with print screen but am not able to attach here
Thanks Amy
David Williams
Veteran Member
Posts: 1127
10/28/2010 11:26 AM
Split
Change the name of your function: function triggerMyFlow()
Change the Action of your Submit button to Function and select your function.
David Williams
Veteran Member
Posts: 1127
10/28/2010 11:27 AM
Split
amylynanderson
Advanced Member
Posts: 26
10/28/2010 12:32 PM
Split
That worked ... now I just need to figure out how to pass the jobname, user id and company to the PFI to webrun the job first. Thanks for you help.
David Williams
Veteran Member
Posts: 1127
10/28/2010 1:09 PM
Split
Add the variables to your Service and pass them in your AGS call:
var s = portalWnd.AGSPath+"?_PDL="+
"FOCUSQA&_TKN=WFWK.1&_EVT=ADD&_RTN=DATA&_LFN=ALL&_TDS=IGNORE"+
"&FC=A&SERVICE=LMEXPIRING&WORK-TITLE=LM199TriggerLMEXPIRING"+
"&VARIABLE-NAMEr0=USERID" +
"&VARIABLE-VALUEr0=" + lawForm.getFormValue("text1") +
"&VARIABLE-NAMEr1=JOBNAME" +
"&VARIABLE-VALUEr1=" + lawForm.getFormValue("text2") +
"&_DELIM=%09&_OUT=XML&_EOT=TRUE";
amylynanderson
Advanced Member
Posts: 26
10/28/2010 4:42 PM
Split
thanks got the job working. But I do not want the flow to continue if the job goes into needs recovery or invalidate paramenters. I have the WAIT=true so at least it will wait until the job is done before continuing. What do I put in the success string field on the webrun to indicate success?
David Williams
Veteran Member
Posts: 1127
10/28/2010 4:55 PM
Split
I'm not sure. You could always Query the QUEUEDJOB table to make sure the job didn't go into Waiting status.
http://consultdavidw.blog...ou-would-use-to.html
John Henley
Posts: 3351
10/28/2010 5:40 PM
Split
Are you referring to a &WAIT=true parameter on jobrun.exe ?
amylynanderson
Advanced Member
Posts: 26
10/28/2010 7:04 PM
Split
NO, I am using that. The results to check if the job completed successful. How can I do that? The WAIT=true does not stay on the node when a job goes into Needs recovery or Invalid parms too. If either of these situation happen I do not want to go to the next node.
Thanks Amy
John Henley
Posts: 3351
10/28/2010 8:10 PM
Split
Use David's query, after the jobrun, and branch accordingly.
amylynanderson
Advanced Member
Posts: 26
10/29/2010 5:43 PM
Split
Just an FYI on what I did to solve my problem of verifying the report did not go into need recorvery or invalid parameters.
I changed the webrun node to a syscommand node
/bin/wtsubmit -v | grep | wc -l
ERROR = Abnormal
After this node I put a branch to test for outputData = 0 Job Completed Success outputData = 1 Job Needs Attention
David Williams
Veteran Member
Posts: 1127
10/29/2010 5:51 PM
Split
Thanks, I'll try to remember that. It's good to learn new things.
Please
login
to post a reply.