Tracy did you write this originally? There’s very little difference between the calls in WCF and the Calls in Rest in fact you can call the exact same Methods you just have to use new syntax which is outlined in the Nuget Documentation and several of us have provided examples.
In your WCF Call you invoke GetNewJobAsmblMultiple as such
If you follow the documentation you will know that you can make that same exact call via EpicorRest.BoPost something like
/*
The payload for rest call is usually (unless you want to make a class) an anonymous
object which needs to conform to the same requirements as the WCF Call above
so in this case you'd re-create an object that includes the fields in the
above GetNewJobAsmblMultipleCall something like */
var postData = new {
"pcTranType": "STK-MTL",
"pcMtlQueueRowID": Guid.Empty(),
"pCallProcess": "IssueMaterial",
"ds": {
"SelectedJobAsmbl": [
{
"Company": "COMP01",
"JobNum": jobNum,
"AssemblySeq": asmSeq,
"RowMod": "A"
}
}
};
var result = EpicorRest.BoPost("Erp.BO.IssueReturnSvc","GetNewJobAsmblMultiple", postData)
That result would be the same result you’d get out of the above WCF call, and you then would do the same with the next BO call etc.
I am working through it again now to try and build it up the way you have put it above, I am not a developer, the developer that wrote the wcf version has left so myself and my colleague are trying our best to replicate what the wcf project was doing but effectively we are learning from scratch and timescales are tight to go live on Kinetic.
not to put too fine a point on it but just converting the code is half of the battle if you aren’t a developer and don’t fully understand what the original person did or what needs to be done now, and neither does your colleague this would be a good opportunity to get some help from an outside consultant or partner to get you over the hump.
Generally it is not a good idea to put code in production that you do not fully understand you could end up with a half working solution at best and at worst with corrupted incorrect data.
Most companies aren’t too keen on spending money, but the alternative could be much worse. I’m not trying to offend you I’m sure given enough time and resources you could figure it out and do a good job. But if you are up against a deadline I would recommend you bring someone skilled in.
There are some wonderful folks around these folks that can help and we have some wonderful independent and partner consultants that lurk around too.
If there are just a few errors it might be a simple fix like one of the BO’s signature changed. If it can be simply resolved, then you could use the WCF code which is already proven while you take your time and carefully learn and test a REST based solution.
Otherwise you might either want to get help or put off your upgrade. Its better to do things right than to rush.
Won’t really help any if understanding what Bo’s need to be called and why, and what they take is the part giving them trouble… Plus they still would need to parse the files and send the data up via rest…
Yes you still need to know the BO’s to be called, but this is just a case of doing the issue whilst in trace mode.
The trace log will tell you what you need to know.
The great thing about functions using widgets is it all very intuitive and doesn’t require lots of custom code.and you can build the function, using the trace file as a blueprint.
Then there is security, not having to expose all the BO to a Rest login using Access Scope is really useful.
I have added my first BO to the project (IssueReturn > GetNewJobAsmblMultiple) and the response is now populating with a ‘return object - IssueReturn’ as shown below
I hate to sound like a broken record but if you need someone to do it for you, you should seriously consider bringing in a partner or a consultant. Most of us love to help when we can, but we have no time to flesh out entire solutions
You might be biting off just enough to chew on if you just start with this and use your VS code to call it.
Also… are you really on E10? That’s what your profile says. If you said different somewhere in the previous 48 posts, I have forgotten. Point is, I don’t recall what version that EFx library is from.
We are on E10 but have a working solution for that, we are in the process of upgrading to Kinetic 2023.2 which is what we need the working solution for
Hi Jason,
I have got the function to work in REST however when i look at the material transaction against the job it doesn’t seem to be posting to the GL, is this something you have noticed?