some time ago I created project named TFS2NAV. Now it is time to tell you what you can do with it.
If you are using Dynamics NAV in your company and you are using TFS (on-prem or Team Services), this project helps you to extend the TFS by passing information about different things from TFS into your NAV. Than you can develop own process in NAV to do what you want.
TFS has feature named Service Hooks. Service Hooks are web services, which could be called when something happens inside TFS. And which events you can hook?
- Build completed
- Code pushed
- Pull request created
- Pull request merge commit created
- Pull request updated
- Release abandoned
- Release created
- Release deployment approval completed
- Release deployment approval pending
- Release deployment completed
- Release deployment started
- Team room message posted
- Work item commented on
- Work item created
- Work item deleted
- Work item restored
- Work item updated
- Azure Service Bus
- Azure Storage
- Web Hooks
- TFS2NAVService_NAV_TFS2NAV – URL of your NAV Webservice (any function with one Text parameter returning Text)
- WSUserName – user name for authentication to the NAV WebService
- WSUserPwd – password for the account
- WSUserDomain – domain of the user
- WSauthType – type of authentication (NTLM /Windows)
Create new Service Hook in TFS, select Web Hooks service, Select trigger you want, set the filters. Now set the URL to something like http://server:port/TFS2NAV/TFS2NAVListener.svc/ToNAV. Test the service through Test button. It will generate some dummy event and will show you the result. If all is OK (the message wen through TFS2NAV into your NAV webservice), you can Finish the process and your hook is prepared.
Because the data are passed into NAV as Json, it is on you to parse it, but you can find how to do that e.g. here.
Now you have a way how to connect TFS and e.g. your internal management system in NAV. And because you can manipulate TFS data through REST API, why not to connect your NAV to TFS through it and when needed change something from NAV? You can look at the TFS REST API here. And how to call REST service from NAV here.
As you can see, we a using REST (OData) more and more and you can connect your NAV with different services through that. I hope that it will comes your management system to new level, when you will be able connect your data with processes in DevOps and you will do more through automatic processes using TFS+PowerShell+NAV.