mkloubert / vs-deploy

Visual Studio Code extension that provides commands to deploy files of a workspace to a destination.
https://marketplace.visualstudio.com/items?itemName=mkloubert.vs-deploy
MIT License
131 stars 24 forks source link

Feature Request: Deploy to Dynamics 365 #2

Open ghost opened 7 years ago

ghost commented 7 years ago

If you could manage the bridge from vscode to dynamics 365 webresources that would be amazing. I know that this would be extremely difficult I guess.

mkloubert commented 7 years ago

Is there something like a (REST) API that can be used to upload and/or create webresources?

How do you upload these resources?

ghost commented 7 years ago

For the newbie user, they'd upload those via a form. There are a lot of C# methods to do it. There is a REST api, but I don't know of a way to upload webresources via that way. Maybe have a look at XrmToolBox WebResourceManager. Usually ppl use that or a Visual Studio (not Code ;)) integration.

mkloubert commented 7 years ago

According to this article (Full URL chapter) web resources can be accessed via an URL like https://MyOrganization.crm.dynamics.com/WebResources/new_/test/test.htm.

Is it also possible to upload files via WebDAV by using basic authentication, e.g.?

This would be a great chance to implement such a target :D

ghost commented 7 years ago

As you can see, the target is only virtual, the webresource is stored in a MSSQL DB. I don't know a way how to create one via JavaScript that is why I think it is so difficult. And Dynamics is proprietary and mainly focused on the cloud so you cannot install something on the server.

mkloubert commented 7 years ago

What I mean is:

Maybe it is possible to upload via a "raw" HTTP (PUT) request with your credentials and a tool like cURL or a tool that is similar or your web browser:

curl -T .\localTest.htm https://MyOrganization.crm.dynamics.com/WebResources/new_/test/test.htm --user MyOrganization\con-ssc:password

In that case, WebDAV works as a layer for any operations of Microsoft Dynamics: I do a simple and common request to the URL of the web resource and inside Dynamics, Microsoft does "the magic" with MSSQL and all the things I do not need to do.

The only thing I get is a HTTP response to check if anythings worked fine.

ghost commented 7 years ago

Well, you can create an online trial and give it a go :)

mkloubert commented 7 years ago

Great! 👍

I will try it the next days...

ghost commented 7 years ago

https://github.com/davidyack/gulp-webresource I found this the other day for Dynamics 365 online. If someone could add NTLM auth too for on premise that would be great.