Tag Archives: Visual Studio
Business Central 2023 wave 1 (BC22) new features: AL Explorer and AL Home in Visual Studio Code AL extension
Introduction: Business Central 2023 wave 1 (BC22) new features: AL Explorer and AL Home in Visual Studio Code AL extension Steps : 1. Download and install the next major version of the AL Language extension. (v11). 2. Below is the download link of the AL Language below to experience the new features of the development. Click on this link Link: ALLanguage v11.0.759316. Extract that folder and we can see there is a VSIX extension file. 3. Uninstall your previous AL language extension from the visual code marketplace. 4: Go to visual studio code extension marketplace, then click on 3 dots -> click on-> Install from VSIX. 5 : Select vsix extension file, and click on Install. Here, we have successfully installed the AL language extension. 6. First of all, when we open the VS Code, we will see the AL Home below. 7. Another shortcut key for this AL Explorer: AL: Explorer: Ctrl + Shift + F12 Below is the AL: Explorer page. 8. We can View, search, and filter objects: a. Group By: b. Module c. Go to Source Code For a selected object, we can quickly jump to source code, whether to develop or read. d. Bookmark: We can bookmark objects. Below is the Bookmark object. e. API: AL Explorer also allows an overview of all APIs. f. Events: AL Explorer also allows an overview of all Events. g. Extensible Enums: AL Explorer also allows an overview of all Extensible enums. Thank you, I hope this helps!
How to delete workspace from TFS Visual Studio
Introduction: In this blog, we will see how we can delete any of the TFS workspace which is assigned to different user Even if tried to remove/delete the workspace from Visual Studio, We’re unable to map existing workspace to new user. In such scenario, It is necessary to delete the workspace explicitly while getting the error as below “The working folder ‘Workspace_Folder_Local_Path’ is already in use by the workspace : on computer Solution: 1. Open Developer Command Prompt for VS2015 from Start menu 2. For getting the list of workspaces associated with user, run below command tf workspaces /server:https://{TFS}.visualstudio.com/{CollectionName} /owner:”{Owner}” Explanation, in my case {TFS} is xxxx.visualstudio.com/defaultcollection and {Owner} as Jagdish Solanki, Eventually it will look something like this, tf workspaces /server:https://xxxx.visualstudio.com/{CollectionName} /owner:”Jagdish Solanki” Reference: 3. To delete the workspace, run below command tf workspace /server:https://{TFS}.visualstudio.com/defaultcollection /delete “{Workspace};{Owner}” It will looks something like this, tf workspace /server:https://xxxx.visualstudio.com/defaultcollection /delete “SCM-DEV-1;Jagdish Solanki” Once the above command is executed, system will prompt you if user has any pending change(s). Are you sure want to delete the workspace? (Yes/No). Enter yes Reference:
Visual Studio Tip
Finance and operations departments in a company are quite crucial as they help the business to flourish and reach heights. Companies, therefore, should do everything from their end to better the processes in these departments. Using an ERP solution is one of the wisest and best ways to do this job. Dynamics 365 for finance and operations is one of the best enterprise resource planning solutions that you can find in the market. It is one of the best products that Microsoft has created. They offer some of the best features which you cannot find any other ERP software that you find in the market. But, if you want to enjoy the benefits that come from using this system, you should first learn how to use this software. Here is one more tip that will help you become efficient. Many of us use Visual Studio for development whether we are developing it Using physical machines or virtual machines. While making any changes to existing code or to save your changes we must have to run VS with administration permission. So every time you right-click on file shortcut and select Run as administrator. So I came up with an inbuilt option in Microsoft Windows operating system after which you don’t have to repeat the steps which are mentioned above. Steps are as follows:- Right-click on your Visual Studio shortcut and select properties. Select the ” Advanced” option. Tick on Check-Box for Run as Administrator and click on ok button. Click on the “Apply” button. And Then click on the “Ok” button. Now you are all set, Every time you open Visual Studio it will open with administrator permissions.
Count Number of weekends between 2 dates in SSRS
Problem: There is no in-built function in SSRS where we can count the number of Saturdays and Sundays between any two dates in SSRS. This is a needed function for scenarios where we only need to get a count of working days.’ Solution: Following is a formula that can be used for getting an accurate count of weekends. = (((DateDiff (DateInterval.Day, DateAdd(DateInterval.Day,7-WeekDay(Parameters!startDate.Value),Parameters!startDate.Value), DateAdd(DateInterval.Day,7-WeekDay(Parameters!endDate.Value),Parameters!endDate.Value).AddDays(1)) + 1)/ 7)*2) + iif(weekday(Parameters!endDate.Value)=7,1,0) + iif(weekday(Parameters!startDate.Value)=1,1,0) -1 Here instead of Parameters!startDate.Value and Parameters!endDate.Value, you can use any other Start Date or End Date.
Generating Image dynamically in SSRS Report from CRM
Introduction: It is possible to Fetch images from CRM’s entity records using Fetch XML. This can be done using Notes attachment in CRM and the steps to display the Image in your report are pretty simple as well. Steps: Attach your image to a note under your respective entity in CRM In your Visual Studio copy paste the following code in your Query Designer <fetch mapping=”logical” output-format=”xml-platform” version=”1.0″> <entity name=”annotation”> <attribute name=”subject”/> <attribute name=”notetext”/> <attribute name=”filename”/> <attribute name=”filesize”/> <attribute name=”documentbody”/> <attribute name=”annotationid”/> <attribute name=”mimetype”/> <attribute name=”objectid”/> <filter type=”and”> <condition attribute=”mimetype” value=”%image%” operator=”like”/> </filter> <order descending=”false” attribute=”subject”/> </entity> </fetch> Add an Image Control in your Report. If you want to generate multiple images then you can add the Image Control under a Table Go to Image properties and select the image source as Database. Under field select documentbody and select your MIME type to whichever image format you want it to be Click on preview and your image should be rendered in your report Conclusion: Thus you can store images in your CRM and generate dynamic SSRS reports with these images easily.
Row Numbering Issue for Grouped Data in SSRS
Issue: In SSRS if we are using an aggregate function in a group at the Tablix level, then you may realize that the simple row numbering function does not give a current sequential ranking. Using the function RowNumber(Nothing) gives something like this. Using RowNumber(“GroupName”) would also give an incorrect row numbering and look something like this. This is because RowNumber does not actually give the row count. Rather it counts the incidences of the data in the group and returns that value. Solution: We can use the “RunningValue” function in SSRS. The format for the expression would be. =RunningValue(<Grouped field>,CountDistinct,”<DataSet>”) Eg: =RunningValue(Fields!Name.Value,CountDistinct,”Accounts”) This would return something like this. This should fix your issue!