shashisadasivan / SSD365VSAddIn

Visual studio addin for D365 Finance and operations
https://shashisadasivan.github.io/SSD365VSAddIn/
MIT License
35 stars 22 forks source link

Label in string #14

Closed krconnect closed 5 years ago

krconnect commented 5 years ago

Is it possible to use the addin to add a label to a string? following example: throw error(strFmt("message example", "Test"));

shashisadasivan commented 5 years ago

@krconnect that was something i was thinking about too :) Wondering if we can do that by parsing the entire code as a string and finding labels marked under double inverted commas.

krconnect commented 5 years ago

@shashisadasivan I don't know how to pop up the addins menu in a selected string. do you have any idea?

shashisadasivan commented 5 years ago

@shashisadasivan I don't know how to pop up the addins menu in a selected string. do you have any idea?

@krconnect will probably need to read the entire source code for the class / table / dataEntity, and parse it to find a pattern on this.

shashisadasivan commented 5 years ago

@krconnect you may try this out now :) I think i will need to make it work for attributes as well on methods. Currently the way you can scan code is by going through each method and getting the source code as a string. So may need to make this work for attributes as well.

Thanks for this suggestion.

krconnect commented 5 years ago

@shashisadasivan hi! how wonderful! how do I use it, because this option does not appear for me to test.

shashisadasivan commented 5 years ago

@shashisadasivan hi! how wonderful! how do I use it, because this option does not appear for me to test.

merged changes into the master branch. Do copy all the DLL's in the outputDlls folder to where you install it.

https://www.youtube.com/watch?v=uxZp7mF0cWA

krconnect commented 5 years ago

Fantastic!!! Now I understand, is that my addins did not update. This new option did not appear. I'll see what happened. Thank you very much. It is perfect!

krconnect commented 5 years ago

@shashisadasivan can't update a .dll already restarted visual studio and the addins don't show a new option. Do you know what I can do?

I already copied SSD365VSAddIn.dll and Newtonsoft.Json.dll to the folder C: \ D365CustomAddIns

<?xml version="1.0" encoding="utf-8"?>

C:\D365CustomAddIns .......
shashisadasivan commented 5 years ago

@shashisadasivan can't update a .dll already restarted visual studio and the addins don't show a new option. Do you know what I can do?

I already copied SSD365VSAddIn.dll and Newtonsoft.Json.dll to the folder C: \ D365CustomAddIns

C:\D365CustomAddIns .......

Check if the DLL's are locked? Check the unblock aftetr downloading the dll's image

Can you empty out that folder, then start VS - the Addins should dissapear. If not then the DLL's are in the folder "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\hsbpvpjt.yof" or will be in one of the folders in Extensions Close VS, then Copy the 2 dll's into that folder and start VS

krconnect commented 5 years ago

It worked !!! Thank you !!! Since you work with many developers, you always encounter a number of merge-related issues when it comes to generating a package. To avoid this, decide to create an entity in powerapps to control the tag file. Within the LabelHelper class, you can make a call in Microsoft Flow, or execute a flow and write an entity in powerapps. Then labelId is ignored on the developer's local machine, ie it uses the sequential number that is not in powerapps (azure). When we generate or build, we have another flow in Microsoft Flow, which generates the tag file and acidifies the project to generate the build. Thanks for the great help!

This was an idea we had to avoid wasting time solving problems with label merge.