Is there any way to get all cost categories for any given project using eConnect 9?
*This post is locked for comments
Is there any way to get all cost categories for any given project using eConnect 9?
*This post is locked for comments
Sandip,
Thanks for the offer. I'm heading out for a weeks vacation tomorrow. So, it will be a minute before I get back to this. But, I created a new post community.dynamics.com/.../111015.aspx Where I'm going to document my experience in creating a custom web service. Gave you props ;)
Adding functionality to eConnect is the meat of the exercise. The example code is pretty nice, but its not trivial. Enjoying so far. Gives some very good insight into design patterns employed by our friends in Redmond ;)
We can continue the conversation on that thread as it is more relevant.
Peace,
Matt
One more thing. Once eConnect code is ready I wrapped that one in my Custom web Service it take max 1 hr more.
Thanks
Sandip
Matt,
I have created two types of webservices. One is just using SQL Views to read data another is I used eConnect API , eConnect API wrapped in my Custom Web Services. e.g. I have created Web Services using eConnect to create NextTransactions Number or Purchase Receipt - Receipt/Invoice.
I will be happy to share my code. Please feel free to email me sandipdjadhav@Hotmail.com.
Thanks
Sandip
Hey Sandip,
Thanks for the reply. However, what I was MOSTLY after was a level of effort estimation given my known time for creating a web service extension. For instance, given that you have created a custom web service leveraging the Dynamics GP Framework, how long did it take you to create your first custom web service?
Thanks,
Matt
Matt,
you can use directly eConnect instead of creating webservice. Direct table access is also possible. If you use eConnect API then you have to install eConnect client on each machine which is going to user your application. If you use Dynamics GP WebService you don't have to.
I hope we both are on same page.
let me know if you need my help.
Thanks
Sandip
Hey Sandip,
I'm back to thinking about this side of my project and I'm considering your suggestion. I've done some digging through the lead example included with the SDK. The web extension stuff was very straight forward and easy to implement and deploy. Custom Web Services are significantly more difficult. Given that the web extension took me about 8 hours to do my first go around, what would you say is a reasonable time estimation to complete my first Custom Web Service?
I'm really starting to wonder if I should just back up and use eConnect directly to the DB via TCP/IP. Web Services is a LOT of overhead on SQL calls. Thoughts???
Thanks for your help!
Matt,
Why don't you create your custom web services using .Net? Below is SQL Script to get all Cost Categories by Project. Create it as view and then use it in your webservice to retrieve data by Project.
SELECT dbo.PA01301.PAPROJNUMBER, dbo.PA01301.PACOSTCATID, dbo.PA01001.PACOSTCATNME, dbo.PA01301.PABase_Qty, dbo.PA01301.PAPostedQty,
dbo.PA01301.PABilled_QtyN
FROM dbo.PA01001 INNER JOIN
dbo.PA01301 ON dbo.PA01001.PACOSTCATID = dbo.PA01301.PACOSTCATID
---WHERE (dbo.PA01301.PATU = 4)-
Thanks
Sandip
The saga continues,
So I created a Web Services Extension. Which is a very kewl structure inside the Web Services mechanism. However a fundamental requirement is that only objects that extend BusinessObject (msdn.microsoft.com/.../cc533662.aspx) can return extensions. Mr. Murphy, of Murphy's law, arose and stymied the process again.
Projects, table PA01201, and Cost Categories, table PA01001, create ProjectSummary Objects, table PA01301, which is NOT a BusinessObject extended object. So, I can't add an extension to GetProjectLists, ProjectSummary[] return array. So, the process requires getting a unique list of project ID's, I use LINQ on Objects, from the ProjectSummary[], then calling GetProjectbyKey and then returning the Cost Category extension.
Who would have thought that getting a Cost Category Description would have been SUCH a difficult exercise. If there is an easier way to do this, happy to know about it.
Thanks,
Matt
Way to go Matt !!!
Thanks
Sandip
I have DONE IT! Very Proud of my self, beaming ;)
The way to debug the Extension DLL is as follows. Specific info here: msdn.microsoft.com/.../3s68z0b3.aspx
Here are the abbreviated easy to follow steps.
1. Compile and deploy the DLL in debug mode, assuming this has already been deployed to Dynamics and updates to BusinessObjectsFile.config has been property configured via msdn.microsoft.com/.../cc508802.aspx instruction. Deploy the debug mode .DLL AND .PDB file created from debug mode build.
2. Restart the Microsoft Dynamics GP Service Host service.
2. Open an instance of Visual Studio.
3. Attach to the Dynamics Web Services Process: Microsoft.Dynamics.GP.ServiceHost.exe in my machine via VS->Debug->Attached to Process
4. Set Breakpoint via VS->Debug->New Breakpoint->Break At Function. Enter "Namespace.Class.Method" in "Break Execution when the program reaches this location in a function" Textbox. I left the "Use IntelliSense to verify the function name" check box checked.
5. Run code that calls the Web Services code that calls the Dynamics Web Extension.
6. Get your DEBUG ON!
Happy Friday!!!
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,375
Most Valuable Professional
nmaenpaa
101,156