Development Archives - Impulz Technologies LLC https://impulztech.com/tag/development/ Microsoft Dynamics and Power Platform consulting company Wed, 24 Apr 2024 09:08:52 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://impulztech.com/wp-content/uploads/2022/08/cropped-impulz-tech-32x32.png Development Archives - Impulz Technologies LLC https://impulztech.com/tag/development/ 32 32 Optimizing Azure Workloads: Automate VM Startup and Shutdown https://impulztech.com/optimizing-azure-workloads-automate-vm-startup-and-shutdown/ Wed, 24 Apr 2024 09:06:48 +0000 https://impulztech.com/?p=3667 Pre-Requisite Azure Active Subscription (https://portal.azure.com/) Basic Scripting Introduction to Azure Virtual Machines (VMs) Azure Virtual Machines (VMs) serve as the backbone of countless applications and services hosted on Microsoft’s cloud platform. Offering unparalleled flexibility and scalability, Azure VMs empower businesses to deploy a wide range of computing solutions, from simple web applications to complex enterprise […]

The post Optimizing Azure Workloads: Automate VM Startup and Shutdown appeared first on Impulz Technologies LLC.

]]>

Pre-Requisite
  • Azure Active Subscription (https://portal.azure.com/)

  • Basic Scripting

Introduction to Azure Virtual Machines (VMs)

Azure Virtual Machines (VMs) serve as the backbone of countless applications and services hosted on Microsoft’s cloud platform. Offering unparalleled flexibility and scalability, Azure VMs empower businesses to deploy a wide range of computing solutions, from simple web applications to complex enterprise workloads. These virtualized instances provide on-demand access to computing resources, enabling organizations to swiftly adapt to fluctuating demands without the overhead of managing physical hardware. With Azure VMs, users can choose from a diverse selection of operating systems and configurations, tailoring their environments to meet specific requirements. Whether for development, testing, or production environments, Azure VMs offer a reliable and cost-effective solution for modern cloud computing needs. By automating VM startup and shutdown we can not only optimize the cost but our workloads too.

Importance of Automation in VM Management:

Automating virtual machine (VM) management tasks is crucial for modern cloud environments like Azure. With the ever-growing scale and complexity of cloud deployments, manual management becomes impractical and error-prone.By automate VM startup, shutdown, and scaling, enabling organizations to operate more efficiently, reduce human error, and focus on strategic initiatives. By implementing automation, businesses can ensure consistent performance, optimize resource utilization, and enhance overall productivity.

Benefits of Auto Start and Auto Shutdown Policies:

Auto Start and Auto Shutdown policies offer significant benefits in Azure VM management. Firstly, they enable organizations to optimize costs by automatically starting VMs only when needed, preventing unnecessary usage and expense. Conversely, auto shutdown ensures resources are not left running idle, reducing waste and lowering operational costs. Additionally, these policies enhance reliability and security by ensuring VMs are consistently available during business hours and safely powered off during non-operational times. Overall, Auto Start and Auto Shutdown policies play a pivotal role in maximizing efficiency, minimizing costs, and maintaining a well-orchestrated Azure environment.

Configuring Auto Start for Azure VMs:

Here are the detail steps to configure the auto-start VM in Azure:

  • In Azure, First go to Automation Accounts resource and click on create a new resource.

  • You have to give your automation account name, resource group and select the region and subscription in which your VM’s are placed and click on create.

  • After the resource has been created go to it’s overview page and from there you can find different options in sidebar, look for Runbook, select it and then click on create a new runbook button.

  • Give runbook a name, select python workflow as a runbook type. Select its available version and click on create button.

  • Now in Automation Account page search for schedules in a sidebar and click on create a new schedule.

  • On create a schedule page, you can give your schedule a name and the date in which you want to start schedule and modified it according to your needs.

  • Now in runbooks, go to the runbook which you have just created. Click on edit btton at the top, so we can write our modified script in there.

  • Write the following script, change the resource group name and vm name according to your environment. After test it and publish it by clicking on publish button.

  • Now just click on schedule in runbook page and then click on add a schedule button. And select the schedule which you just had created.

  • Now your auto-start runbook is done and it runs on assigned schedule you can check the results in jobs section. In the runbook sidebar to see the output of the runbook process and its done!

Implementing Auto Shutdown for Azure VMs:

  • Log in to the Azure Portal  and navigate to the Virtual Machines blade.

  • Choose the virtual machine for which you want to set up auto shutdown.

  • In the virtual machine’s menu, select “Auto-shutdown” under the Operations section.

  • In the Auto-shutdown blade, toggle the “Auto-shutdown” switch to enable the feature. Then, specify the desired shutdown time and time zone. Optionally, you can set a notification to alert users before shutdown.

  • Once you’ve configured the auto shutdown settings according to your requirements. Click the “Save” button to apply the changes.

Conclusion:

In conclusion, By automate VM startup and shutdown processes of Azure VMs brings numerous benefits to organizations utilizing cloud infrastructure. By implementing Auto Start and Auto Shutdown policies, businesses can optimize resource utilization, reduce costs, enhance reliability, and improve overall operational efficiency. These policies streamline routine tasks, mitigate human error, and ensure that VMs are available when needed while minimizing waste during idle periods. Through the deployment of automation, organizations can focus their efforts on strategic initiatives rather than mundane maintenance tasks, ultimately driving innovation and competitiveness in the cloud era.

You can checkout our further blogs by going to this link: Blogs

HAPPY LEARNING !

The post Optimizing Azure Workloads: Automate VM Startup and Shutdown appeared first on Impulz Technologies LLC.

]]>
Microsoft Dynamics 365 Finance and Operations: Importing deployable package to UAT/Production using Lifecycle Services https://impulztech.com/microsoft-dynamics-365-finance-and-operations-importing-deployable-package-to-uat-production-using-lifecycle-services/ Mon, 10 Apr 2023 08:26:21 +0000 https://impulztech.com/?p=3086 Overview In Microsoft Dynamics 365 Finance and Operations, development and customization can be done within development environment and deployed to UAT / Production environment. In this blog we are going to discuss how these changes can be deployed to UAT / Production environment Steps for deploying changes using Lifecycle Services Step -1: Create Deployable package […]

The post Microsoft Dynamics 365 Finance and Operations: Importing deployable package to UAT/Production using Lifecycle Services appeared first on Impulz Technologies LLC.

]]>

Overview

In Microsoft Dynamics 365 Finance and Operations, development and customization can be done within development environment and deployed to UAT / Production environment. In this blog we are going to discuss how these changes can be deployed to UAT / Production environment

Steps for deploying changes using Lifecycle Services

Step -1: Create Deployable package and save it in a folder.

Step -2: Go to https://lcs.dynamics.com and enter your credentials

Step-3: Click on your implementation project. Then go to Asset Library using 3 bars icon as shown in the below screenshot.

Step-4: Go to Software deployable package Tab in Asset Library. Then add the new package here which we have created from dev environment.

What is a deployable package?

Let’s first define what a development environment package or a deployable package is, before we dive into the deployment process. A deployable package is a collection of customizations and extensions that have been developed in a development environment. This package contains the code, metadata, and configurations that can then deploy to the UAT or Production environment.

Step-5: As we can see in below screenshot, we need to give name for uploading our package into Asset Library first. Then the package will be eligible to deploy to UAT or Production.

Step-6: Once package is added into asset library and if you want to publish it in the UAT environment, click on the highlighted option in the screenshot below.

Step-7: Now go to navbar Maintain and click on Apply updates

Step-8: Provide unique name for you Package. Such as write package name with date and then select the package uploaded in asset library and click on Apply 

Step-9: It can take about 1 to 3 or more hours depending on the size of the package.

Step 10: After successful deployment we can check the Activity status completed or Rollback. If we get any errors during the deployment, it will be rollback and we need to fix it in development environment. Afterwards the whole process of deployment will repeat.

Best Practices for Deploying a Development Environment Package to UAT/Production

To ensure a successful deployment, it’s important to follow these best practices:

    1. Always test the deployment in a non-production environment first.
    2. Include all the required models and packages in the deployable package.
    3. Properly configure the target environment so that it can meet the requirements of the customizations and extensions.
    4. Take a backup of the target environment before deploying the package.
    5. Monitor the deployment progress and resolve any issues that arise during the deployment process.

Good luck.

 

The post Microsoft Dynamics 365 Finance and Operations: Importing deployable package to UAT/Production using Lifecycle Services appeared first on Impulz Technologies LLC.

]]>
Microsoft Dynamics 365 Finance and Operations: Customization of non-extendable code https://impulztech.com/microsoft-dynamics-365-finance-and-operations-customization-of-non-extendable-code/ Tue, 18 Oct 2022 14:53:19 +0000 https://impulztech.com/?p=2736 In Dynamics 365 Finance and Operations customization in standard objects is done through extension-based development. But there are some scenarios where a class method which needs to be customized through CoC (Chain of Command) is having Hookable attribute set as False. In that case you cannot create a CoC of that method. For example, there […]

The post Microsoft Dynamics 365 Finance and Operations: Customization of non-extendable code appeared first on Impulz Technologies LLC.

]]>

In Dynamics 365 Finance and Operations customization in standard objects is done through extension-based development. But there are some scenarios where a class method which needs to be customized through CoC (Chain of Command) is having Hookable attribute set as False. In that case you cannot create a CoC of that method.

For example, there is a class with a run method’s Hookable property set as false.

Public class CredManCreditLimitAdjGenerate extends RunBase
{
    [Hookable(false)]
    public void run()
    {
        if (!this.validate())
        {
            throw error("@SYS18447");
        }
    if (deleteExistingLines && CredManCreditLimitAdjTrans::exist(journalId))
        {
            CredManCreditLimitAdjTrans::deleteAllJournalLines(journalId);
        }
    this.processQueryRun();
    }
}

In this scenario the requirement is to execute some logic after this class’s run method execution is done. If it was a Hookable[true] method then you can simply create an extension of the class CredManCreditLimitAdjGenerate, create a CoC of run() and perform your new logic after the next call of run method. But in this case, you cannot do so.

In order to achieve this requirement technically you just create a new class CredManCreditLimitAdjGenerate_Impulz and set it as a child of CredManCreditLimitAdjGenerate class. Then override run() and include all the parent code with your required logic in it. Below is the code:

Public class CredManCreditLimitAdjGenerate_Impulz extends CredManCreditLimitAdjGenerate
{
    [Hookable(false)]
    public void run()
    {
        if (!this.validate())
        {
            throw error("@SYS18447");
        }
        if (deleteExistingLines && CredManCreditLimitAdjTrans::exist(journalId))
        {
            CredManCreditLimitAdjTrans::deleteAllJournalLines(journalId);
        }
        this.processQueryRun();

        //Write your required new logic here
    }
}

The additional thing you have to do is to change the reference of the original class to your new class by initializing its object or if the class is called from a menu item/button, then simply hide the menu item/button and add a new one with you new class reference.

Using the above approach you can also completely remove the standard run method logic and just add new logic which cannot be possible in case of CoC as you do have to call next() before or after new logic unless the method has the attribute Replaceable[true]. Replaceable[True] allows to skip next call in the extended method.

Note: If the class is private or internal or final then it cannot be extended so in that case you have to entirely copy the class with new name and change the reference in code.

The post Microsoft Dynamics 365 Finance and Operations: Customization of non-extendable code appeared first on Impulz Technologies LLC.

]]>
Model-Driven Apps – Update field based on other field value using OnChange event https://impulztech.com/model-driven-apps-update-field-based-on-other-field-value-using-onchange-event/ Tue, 13 Sep 2022 17:10:30 +0000 https://impulztech.com/?p=2673 As Power Apps (Model-Driven Apps) developers, often we face this scenario of triggering a change of value in one field when a value in another field is modified. In this blog we are going to see how to apply OnChange event in a model driven app field to trigger values in another field. First of […]

The post Model-Driven Apps – Update field based on other field value using OnChange event appeared first on Impulz Technologies LLC.

]]>

As Power Apps (Model-Driven Apps) developers, often we face this scenario of triggering a change of value in one field when a value in another field is modified. In this blog we are going to see how to apply OnChange event in a model driven app field to trigger values in another field.

  1. First of all, create a solution and in that solution create a table or add any existing table (here I have created a new table named TestOnChange). Then go to the table and select form options.

2. In Forms option there are multiple form designs but for our case we will use the main one which is usually used for create new records or edit record.

3. Edit the form and you will be on the following screen. From the right-side panel select event tabs and click on Add Library.

4. This will let you include already added JavaScript file which contains the OnChange event code or you can add a new one. In our case we will add a new file in which the logic is written.
Note: You can also add this file under web resources of your solutions before adding from this dialog.

 

 

5. The code in the JavaScript file is below where getAttribute refers to the logical name of the field.

Note: To check the logical name of the field you can go to the following tab.

6. After adding the file you will see OnChange option on the event tab. Select the field first on which you will apply the event and click on Event Handler.

7. Set the following properties. Function is the name of the function defined in the JavaScript file which will be called on OnChange event.

8. Once done select the table field which will trigger this OnChange event.

9. Once all steps are done just save and publish your app. Now whenever the Name values is changed the OnChange trigger will update the value in FirstName field as defined the JavaScript function.

The post Model-Driven Apps – Update field based on other field value using OnChange event appeared first on Impulz Technologies LLC.

]]>