Webcraft Solutions

Advances and Retainers in Project Operations

Problem Definition: Earlier, milestones were used for advance payments which was not the actual purpose of it. But with the introduction of Advances and Retainers, milestones will only be used for their real purpose on fixed price lines. What are Advances and Retainers? The feature Advances and Retainers are seen on the Project Contract form.  Advance payment or the retainer fees both means the same. It is used for an advance payment from the customer/client. This feature can be applied on fixed price as well as on time and material contract lines. Solution: Conclusion: This feature is helpful for an organization delivering the project. Because it provides margin to recover the costs incurred due to any increase in scope that a fixed price contract would not have allowed. Thank you, Sankalp for your valuable imputs.

Searching on a table is easier with Dataverse Search in Dynamics 365 CRM

Introduction: In Dynamics 365 CRM, we have different search options to search data. As we have hundreds of records of different table, Relevance Search aka Dataverse Search is a global search box that gets the record information across all the tables. There is a new feature introduced in 2022 release wave one for Dynamics 365 CE on Dataverse search. This feature will help users to search & filter for records in model-driven Power Apps. This will make Dataverse Search easier than before to find the data.  Description: What is Dataverse Search? Dataverse Search is a great tool to find quickly records across all the tables. It delivers fast and comprehensive result to all tables, sorted by relevance. In model-driven apps, this Search Box is available in the header in the environment. If we opt into early access of 2021 release wave 2 on a production environment, Dataverse Search is enabled automatically. But if not, we need to enable the Dataverse Search. How to Enable & Configure Dataverse Search: – Before Enabling Dataverse Search: – After enabling Dataverse Search: – Dataverse (Relevance) Search is used by the Dataverse Search Index. You can manage & configure the index from the Overview section of a solution. Under Manage Search Index: – It will show us all the tables which are present in the current solution. When users select the tables for indexing, it will show the number of fields that are included in Dataverse Search. These columns are dependent on the Quick Find View. The limit for Columns indexed in this environment is maximum 950 per organization. Users can enable or disable indexing for a specific table from here and can adjust which columns are included in Dataverse Search within the Power Apps portal. Conclusion: With this new update in 2022 release wave one for Dynamics 365 CE, it is just easy to find the record, it also helps minimize the no. of clicks required to find or to get there. References: – Thank you, Shubham Dhumal for your inputs.

How to Create App Using Image

Problem Definition: Nowadays, things are getting much easier and the low-code approach is focused on a larger scale. To create a canvas app, you need to have good knowledge regarding the same. But when we need to create a single form, it used to be a time-consuming process. If any person doesn’t have any idea how the canvas app is used and if he just had to create a form, then it used to be a difficult task. To reduce this task PowerApps introduced a new feature named “Image” which is in Preview Stage. What is an Image? It is an App feature that is used to create a Canvas app by uploading an image of an app or form in it. This will help makers of all skill levels easily turn their designs into working apps and connect them to a data through few easy steps.  Solution:  Steps involved in Image: Conclusion: This feature is easy to use but has many limitations too.

Step by Step guide to CI/CD Implementation

Problem Definition: People tend to make their tasks automated rather than doing them manually. Working with CRM, we always need to work with solutions. Being a developer to satisfy customers’ requirements we always work on a development instance and import it to the production end once done with all implementations. All this is done by performing Export and Import manually from one environment to another. To reduce the tedious work of Exporting and Importing your work manually CI/CD helps in making the flow automatic. What is CI/CD? Continuous Integration/Continuous Deployment – The name itself is self-explanatory, commonly known as CI/CD pipeline. It works in the same way as the normal pipeline, transferring things from one part to another. This task helps you transfer your solutions from the development environment to the production environment effortlessly. Not only solutions but you can also transfer data stored in those solutions using this pipeline. You can also send patches as and when required using the CI/CD pipeline. The CI/CD process includes a series of steps /tasks which are performed to improve the SDLC process via automation. Solution: Steps to perform CI/CD Pipeline: – Power DevOps Tool Download Power DevOps Tool from Power DevOps Tools – Visual Studio Marketplace, so that you could include and implement all the tasks related to the power DevOps tool. These tasks would eventually help you in performing the CI/CD in a much more efficient way. Once you are done downloading the tool (as shown below), you must make sure that you are logged in with the same account as your Azure DevOps. After that choose your Azure DevOps organization in which you want to implement the pipeline. Click on Download and you are done with installing the DevOps in your respective organization. Build Pipeline Go to your Azure DevOps account à Click on the Pipelines tab in the left panel à Create New Pipeline. Here you will be provided with a list of options where your code is residing. For now, we will go with the Azure Repos Git option, which will be responsible for holding and managing all the files your pipeline will execute and export. In the next step, you will be asked to choose a repository (either existing or creating a new one) to which your pipeline will be connected. To create a new repository, go to the Repos tab from the left side panel à Create New Repos. After done with creation, choose the repository which you want to connect to your pipeline and then select the option through which you wish to configure your pipeline. As a beginner, we will choose the Starter Pipeline to customize the code. Once you click on the Starter Pipeline, abasic YAML code will be generated for you. Set the trigger to none or let it run on the default trigger set i.e., main.  Also specify the pool on which platform you wish to run your pipeline. Remove all the default steps provided by the Starter Pipeline and add the following steps: Power DevOps Tool: Even though you have downloaded the tool to your organization, you need to define the tool each time you want to use the tasks related to the tool in each new pipeline. Add the task to your YAML code which will auto-generate the code for you with proper parameters. Ping Environment: This task is used to test the connectivity of your DevOps with the Power Apps. For this task, you will require a connection string that would hold all the information to connect to your CRM. To store all the credentials of your CRM, you need to create a custom variable that will contain all the credentials required. In the Values section, provide the correct AuthType and other required credentials related to the AuthType. For various AuthType refer to – https://docs.microsoft.com/en-us/power-apps/developer/data-platform/xrm-tooling/use-connection-strings-xrm-tooling-connect              Note: Office365 is a deprecated AuthType. For getting the credentials such as ClientID, ClientSecret, etc., you need to register an app in the Azure       Portal. Follow the steps mentioned in the below link: Setting up an Application User in Dynamics 365 | Magnetism Solutions | NZ (Auckland, Wellington, Christchurch and Dunedin) Publish Customization: Many times, we make changes in the CRM and forget to publish those customizations, so in such cases, CI/CD provides you with this task which publishes all the customizations (if left any) through the pipeline run itself. Set Version: This task is added to increment your build number of the solution’s version number after every run of your build pipeline, to showcase how many times the commits are made to the solution being imported. Export Solution: This task is responsible for exporting the solution from CRM which then creates a zip file for the same. Publish Artifact: This task is correlated with the above task, the zip file which is created in the above task is saved in the pipeline which is inbuilt in the DevOps itself. Note: Use the Publish Pipeline Artifact task instead of using Publish Build Artifact, as it is deprecated.) Check Solution: This task works as a Solution Checker which is present in CRM. If any issues are found, then it doesn’t stop the running of the Build Pipeline, but it tells you the number of issues your Solution has and at what level the Issues are (i.e., High, Medium, Low). Unpack Solution: We all know that we don’t use zip files everywhere, so in such a case for extracting those zip files we make use of this task and store those extracted files in the Repos for future use.         For various predefined variables and default locations in DevOps refer to – Predefined variables – Azure Pipelines | Microsoft Docs Release Pipeline Click on the Releases from the left side panel à Click on Create New Pipeline à you will be provided with a list of options to choose from, select Empty Job and name your Stage to showcase what the stage is performing. Also, name the Release Pipeline specific to the task.

Compressing Image Attached in Notes

Problem Statement: Sometimes user has to upload or attach image inside Notes Section of form. When user uploads any image in Notes, dynamics stores image in Base 64 format. As frequency of uploading/attaching images increase then it will also increase the size requirement in CDS. To reduce the size requirement in CDS, we can compress image while storing it in CDS. Solution: When user attaches Image in Note(annotation), we can trigger Post Operation Async Plugin to Compress Image. When image gets attached to Notes, it gets stored as Base 64 inside “documentbody” field. So, we have to trigger Plugin on ‘Create of Notes’, get Base 64 code of Image, Compress Image and Update New Base 64 Code in Notes. Following Plugin code Converts Base 64 Code to Image format compresses Image without loosing quality and then reconvert it to Base 64 code: Plugin Code: (JPEG) Dynamics store Image attached in Note(annotations) in Base 64 form. Image Body will be stored in “documentbody” field and Image Type will be stored in “mimetype” field. Get Image Body and Image Type using following code: Now, create following method, which will compress Base 64 image. We have to pass Base 64 code and quality to custom method which will be used to compress image. Using this method, we can compress image till 10% – 90%. So, pass Image Quality between 10-90. Add Encoder method in class as it is used in “Base64StringImage” method. Once Base 64 Image Code gets compressed, our method will provide new Base 64 Image Code. Store it in new variable. Now, Update Document Body of Note(annotations) with new Document Body. Plugin Step: After Registering our code as New Plugin Assembly, add Step on Create on annotation (Notes). Make Execution Mode as Asynchronous as there will be chances where multiple users will upload Images as same time. Example: Image with Size: 1465 KB Uploaded Image in Notes: Image After Compression: Conclusion: Using above the plugin on Annotation Entity we can effectively compress image size by 10% to 90%. This will help us to save CDS size. Thanks Mayur Hande for your inputs on this blogs.

Disable LookUp Hyperlink in D365

Introduction While working with a Read-only grid in Dynamics 365, if a user clicks on the lookup reference it takes you to the lookup reference record, while the intention was to navigate to the actual record. Let’s see how we can disable the link to the lookup reference. Solution As you can see in the screenshot below, we have link references in 4 different fields Name Customer Service Executive Customer Email (Email-link reference) Microsoft has recently released a new feature that allows the user to disable the Lookup reference link. Follow the steps below to disable the lookup reference link: Step 1: Open the solution and navigate to the entity for which you want to disable the link. While editing the solution please use the classic solution editor as all controls are not visible in the Modern UI. Step 2: Click on control section on the entity form and look for “Power Apps Read-only Grid” Step 3: Change the configuration and select the configuration for the (web, Phone, Tablet). In configuration, select the Navigation type allowed and edit it. Step 4: Set the bind to static options to “Primary only” Step 5: Save and publish the solution and refresh the home grid, you will be able to see the new changes. Conclusion This feature will help you avoid clicking on the wrong reference link on record. Thank you, Subhash for your inputs on this blog.