Is there a BAQ constant that will give me the current server? I need to read it and set up a path to be used in a Kinetic function.
BAQs run in SQL Context, the server is all the same. You have 1 database
What business problem are you trying to solve? You could do something like this with a UBAQ using a GetList() post processing BPM but we’ll need more context.
I am trying to transfer a file containing AP invoice data using a file-transfer widget and then reading the csv in my function so I can process them. In order to read the file, I have to provide a path. I understand that doing a transfer with the widget places the file in the working server directory. I am passing the chosen file name so I need to use the server path and append the file name. This is a tool I am trying to develop for our finance folks so they don’t have to enter each invoice individually.
SysAgent has the task agent server.
Why not use DMT?
Not everyone has DMT, as well as sometimes you need custom.
Somebody buy me DMT.
Why not buy DMT?
I was hoping you would buy it for me.
You seriously don’t have DMT?
ok I still don’t understand the BAQ constant bit. If you want to get server path etc in the function you can do that already in the function code.
Nope. We had it at go live.
I built one import dashboard and they dropped it, said we didn’t need it lol.
“Kevin can do it.”
Don’t feel bad, we don’t use DMT either.
I don’t, making dashboards taught me all this bs I share here.
I thought there might be something like CurrentUserID or something like “CurrentServer”. A shot in the dark.
How do I get it in the function code? Is there an example somewhere?
I think there may be some misunderstanding here. Why do you need the server?
My file transfer widget copies (uploads) the file I choose with the file picker to somewhere. Then, in my function code, I need to access the file, read it, create invoices programmatically and add them to Epicor (kinetics). My finance people want to point to a file, click the magic button and the invoices are “in the system”. Then they wouldn’t have to do any work. Not their words but mine. Excuse my sarcasm.
Yeah give me two shakes.
var sandboxFile = new FilePath(ServerFolder.UserData, "sample.csv");
string sampleData = Sandbox.IO.File.ReadAllText(sandboxFile);