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
Creating a message alert on AP20.1
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Saef
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5226
People Online:
Visitors:
179
Members:
0
Total:
179
Online Now:
New Topics
User Group Announcements
Carolina User Group Meeting
12/20/2024 3:15 PM
Date & Time: February 6, 2025, 8:30am - 4:00pm
S3 Systems Administration
ADFS certificate - new cert
12/3/2024 9:38 PM
The certificates on the windows boxes expired and
Lawson S3 HR/Payroll/Benefits
Post Tax Benefit Plan Table
11/14/2024 9:16 PM
Hi, totally new to Laswon. I have a repor
Lawson S3 Procurement
ED501 Error: Map 850 not supported by /law/c15vda/lawson/test10/edi/bin/laws_out_91
11/12/2024 3:47 PM
Tried runnning ED501 and getting the atathced erro
Lawson S3 HR/Payroll/Benefits
Error
11/6/2024 9:54 PM
When I try to enroll a retiree in 72.1 health plan
Infor ERP (Syteline)
Syteline: New Data Maintenance Wizard (Error) Need help
11/1/2024 4:24 PM
Hi, I need help with an error on syteline while us
Dealing with Lawson / Infor
Implementing Lawson v10 with Cerner Surginet, Case Cart Picking, and Quick Adds for the OR
10/29/2024 4:20 PM
Hi Everyone, I am wondering if there is any org
Lawson S3 HR/Payroll/Benefits
Canada Tax Calculation (Federal and Provincial) Issue
10/23/2024 5:00 AM
Initially, we had problem with CPP2 calculation is
Lawson S3 HR/Payroll/Benefits
CA Section 125 401k Plan
10/22/2024 10:13 PM
Does anyone have any recommendations on how to fac
S3 Systems Administration
Running AC120 deleted records from ACMASTER table
10/22/2024 3:40 PM
We recently ran the AC120 as normal and somehow it
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
1372
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
Creating a message alert on AP20.1
Please
login
to post a reply.
11 Replies
0
Subscribed to this topic
12 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
Eddie Smith
Advanced Member
Posts: 39
11/18/2011 1:49 PM
Would like to be able to create a message alert to the AP clerk whenever a vendor is selected or entered into AP20.1 in which the vendor user field 1 value on AP10.1 is equal to "Y". In help would be appreciated. Thanks.
David Williams
Veteran Member
Posts: 1127
11/18/2011 3:41 PM
Eddie - this is simply an OnBlur for the text field for Vendor number. When the OnBlur occurs you would run a DME in order to look up the User Field on the APVENMAST table and if the value equals 1 you can do an alert to the user with the information you want to give to them.
Do you know how to do a DME?
Eddie Smith
Advanced Member
Posts: 39
11/18/2011 4:15 PM
David-we are somewhat familar with DMEs, just enough to be dangerous. I have the following script, but obviously it's incomplete or entriely wrong. What am I missing?
function TEXT_OnBlur(_f24)
{
var sVen = lawForm.getFormValue ("text7")
//alert (sVen)
s = "http://" + window.location.host + "/servlet/Router/Data/erp?"
s += "PROD=LPRD901&FILE=APVENMAST&INDEX=VENSET1"
s += "&KEY=" APVENMAST.VENDOR-GROUP + sVen
s += "&FIELD=APVENMAST.VEN-USER-NAME-01"
s += "&OUT=CSV&DELIM=~&NOHEADER
var objhttp = new ActiveXObject("Msxml2.XMLHTTP")
objhttp.Open("GET", s, false)
objhttp.Send("UserInfo")
sReturn = objhttp.responseTEXT
alert (sReturn)
}
David Williams
Veteran Member
Posts: 1127
11/18/2011 5:08 PM
Here's a DME call to get vendor class
**/
var vProd = portalWnd.oUserProfile.getAttribute("productline");
var vDmeString ="?PROD=" + vProd + "&FILE=APVENMAST&FIELD=VEN-CLASS;&INDEX=VENSET1&KEY=1=" + lawForm.getFormValue("text2") + "&XCOLS=TRUE&XKEYS=TRUE&XRELS=TRUE&XCOUNT=TRUE&XIDA=TRUE&OUT=XML"
var vDMEInfo = portalWnd.httpRequest(portalWnd.DMEPath + vDmeString)
var vObjDMEXML = new top.DataStorage(vDMEInfo);
var vRecords = vObjDMEXML.document.getElementsByTagName("RECORD");
var numRec=vRecords.length;
var vCols = vRecords[0].getElementsByTagName("COL");
var vClass = vCols[0].firstChild.data;
**/
David Williams
Veteran Member
Posts: 1127
11/18/2011 5:13 PM
I don't think you can set your onblur function to run by specific object (field). I think you will have to get the id of the textbox and perform the rest of the function based upon whether or not you're in the field you want to be.
function TEXT_OnBlur(id, row)
{
if (id != "text7") return true
-- key the rest of your function
}
Eddie Smith
Advanced Member
Posts: 39
11/18/2011 6:08 PM
Thanks David. I've never used the OnBlur function before and was getting some strange results with my code. Yours alleviated the strange results but how do I display the vendor class?
David Williams
Veteran Member
Posts: 1127
11/18/2011 6:26 PM
Well, you don't want to display the vendor class - that was just a sample - but you would alert the variable used to capture the data you want.
alert ("The vendor class value is " + vClass)
Eddie Smith
Advanced Member
Posts: 39
11/18/2011 7:44 PM
Understand the Vendor class was just an example and I added an alert like yours but nothing was displayed on the form. I must be missing something?
David Williams
Veteran Member
Posts: 1127
11/19/2011 12:56 AM
What value do you get when you alert numRec?
Eddie Smith
Advanced Member
Posts: 39
11/21/2011 12:11 PM
No message. I added our vendor group "ULNA" to the dme, could that have something to do with it? Below is the JAVA script I'm using.
function TEXT_OnBlur(id, row)
{
if (id !="text7")
return true
var vProd = portalWnd.oUserProfile.getAttribute("productline");
var vDmeString ="?PROD=" + vProd + "&FILE=APVENMAST&FIELD=VEN-CLASS;&INDEX=VENSET1&KEY=1=" + ULNA + lawForm.getFormValue("text7") + "&XCOLS=TRUE&XKEYS=TRUE&XRELS=TRUE&XCOUNT=TRUE&XIDA=TRUE&OUT=XML"
var vDMEInfo = portalWnd.httpRequest(portalWnd.DMEPath + vDmeString)
var vObjDMEXML = new top.DataStorage(vDMEInfo);
var vRecords = vObjDMEXML.document.getElementsByTagName("RECORD");
var numRec=vRecords.length;
var vCols = vRecords[0].getElementsByTagName("COL");
var vClass = vCols[0].firstChild.data;
alert(numRec)
}
David Williams
Veteran Member
Posts: 1127
11/21/2011 12:42 PM
Check all of the index key values - like company. My sample hard coded 1 so if yours is different...
Eddie Smith
Advanced Member
Posts: 39
11/21/2011 1:13 PM
David, dummy me... of course it's so obvious now that you pointed it out. Working perfectly now. Thanks for your help.
Please
login
to post a reply.