JMyers56
(John W. Myers)
October 19, 2023, 4:48pm
1
I have a function that runs the AP Invoice Post when given a Group ID. This has been working, however it started failing to actually post the batch. I’m using REST V2, and the API key is correct. When trying to execute the function from the Help page, I get the following:
Has anyone had an experience like this?
jgiese.wci
(Joshua Giese)
October 19, 2023, 5:04pm
2
What changed that it’s now not working? V1 to V2 REST change? Version change?
Any information in the Event Viewer for your Epicor App Server?
JMyers56
(John W. Myers)
October 19, 2023, 5:19pm
4
No, nothing’s changed that I’m aware of. We did have to stop/start the app servers after doind a repair on our database, but nothing else… Could it be we need to recycle the app pool on the servers?
jgiese.wci
(Joshua Giese)
October 19, 2023, 5:24pm
5
What did that entail? Any data loss?
klincecum
(Kevin Lincecum)
October 19, 2023, 5:25pm
6
You need to catch errors in your functions and send them somewhere.
1 Like
jgiese.wci
(Joshua Giese)
October 19, 2023, 5:26pm
7
Not necessarily. If he was getting exceptions he would get the “Something went wrong” and at least be able to check the Event Viewer. He’s getting a 200 from his function.
1 Like
klincecum
(Kevin Lincecum)
October 19, 2023, 5:27pm
8
jgiese.wci:
Not necessarily.
Did I stutter?
I mean as best practice. Lot easier to debug when you have something to go on.
klincecum
(Kevin Lincecum)
October 19, 2023, 5:30pm
9
I wonder if he has any exception captures in there already and not doing anything with it ?
JMyers56
(John W. Myers)
October 19, 2023, 5:32pm
10
No, not capturing exceptions that I’m aware of… How should I go about doing that? I’m REALLY new to working with functions!
JMyers56
(John W. Myers)
October 19, 2023, 5:33pm
11
Not seeing anything in the Event Viewer Epicor App Server events that appear related…
klincecum
(Kevin Lincecum)
October 19, 2023, 5:35pm
12
Show us your function. We can probably suggest some places to extract some debug info.
JMyers56
(John W. Myers)
October 19, 2023, 5:42pm
13
I’ve exported the function library (only has 1 function in it). How can I attach that to the thread?
JMyers56
(John W. Myers)
October 19, 2023, 5:42pm
14
PostAPInvoice.efxb (44.5 KB)
Never mind…
jgiese.wci
(Joshua Giese)
October 19, 2023, 5:49pm
15
start by creating output variables for these and outputting them
1 Like
jgiese.wci
(Joshua Giese)
October 20, 2023, 12:07pm
17
@klincecum I know right? Imma drive down to Kenosha and wake him up like Judge Smails
JMyers56
(John W. Myers)
October 20, 2023, 2:41pm
18
OK, OK… I’m awake… I’ll do that
JMyers56
(John W. Myers)
October 20, 2023, 2:50pm
19
Added the variables and linked them to the output parameters… Display them with Show Message now?
klincecum
(Kevin Lincecum)
October 20, 2023, 4:41pm
20
Run it in swagger and you should get output