Raharjo explains that developers often resort to the "change-deploy-validate" approach whenever they tackle a new task or bug. This involves manipulating the JS component, deploying and publishing the changes, followed by testing on the desired page and reloading it. He argues that existing browser features can simplify this process by allowing developers to validate their changes directly.
Using an example, Raharjo discusses embedding an additional feature on the preSearch function to skip the filter if the "Name" contains a "test" word. Furthermore, the author emphasizes making the necessary adjustments without having to refresh the page, since refreshing restores the JS to its server version. Upon testing to check if the changes are satisfactory, these changes can be deployed.
In a subsequent update on May 1, 2023, the author makes a reference to a tutorial by Benedikt Bergmann on using Fiddler to serve a local version of Web resources. Here, he handled a rule applying a filter only in conditions where the JS with URL path contained "/webresources/tmy_demo.js" to the local file.
After applying the filter and setting up the rule, he suggests an important step which he initially missed - restarting Fiddler. The page can be reloaded to see and verify that the specified file has been replaced with your local version.
Raharjo concludes by wishing his readers cheerfully for their journey in the CRM domain, as they delve deeper into Microsoft's Model-Driven Apps.
In the broader technical domain, Microsoft's Model-Driven Apps signify a breakthrough in app development, largely aiding developers in managing and handling complex applications.
They offer a systematic approach to create apps by ensuring data first. By focusing on the core data model, business rules, and processes, they hint at a new paradigm in data-centric application design.
Predicated on the Common Data Service, these apps aim at creating an interoperable environment where dynamic data and business logics can be shared across applications, thereby enhancing their overall utility and effectiveness.
Given its evident benefits and ever-increasing prominence, it is crucial for developers to stay updated with the latest developments in this arena which the digital hub offers.Read the full article Model Driven Apps: Testing JS changes without deploying
As a developer, it's typical to follow a routine - modify the code, deploy, and validate. When it comes to frontend scripting, the absence of a helping tool to update files makes the process more tedious. Normally, you'd need to open the JS component, update, deploy and publish, then navigate to the page you want to test, refresh the page, and test the amendments. Although this process is not necessarily wrong, a much easier method exists to validate changes using a browser's current feature.
Your journey into this exciting world starts with recognizing your original code. An example of one could be a form present within your Streamlined App. In this form, you'd have functions filter contacts, change names, or even load certain parameters. This is where functions like `filterContact` function, `onNameChange` function, or `OnLoad` function comes into play.
To test our JS changes without deploying, you can start by augmenting additional features to pre-existing functions. For instance, to test the preSearch function, an extra feature to exclude the filter if the Name contains the word "test" can be introduced. It's possible to validate these changes and deploy once everything is in order.
However, testing the onLoad event is not as straightforward as it would also require a page refresh. Develop additional code and deploy these initial changes to ensure variables like 'context' aren't left empty after the onLoad function. Make adjustments such as adding new logic to the onLoad function, for example, if the "Name" = "onload," disable two attributes.
The process becomes faster when changes are tested and if you are satisfied with your local modifications, you can swiftly deploy them! Various tutorials and Microsoft's documentations, such as the 'Script web resource development using Fiddler AutoResponder,' can offer more insights into this novel feature. Adopting the Fiddler to serve a local version of Webresources is one step towards mastering this concept. Remember, a rule needs to be added, a filter put in place, and most importantly, the Fiddler restarted for the new modifications to surface. The power of the Dynamics 365 Technical consult, the KL Power Platform User Community Leader and the Human Code enthusiast lies in your hands.
As a final tip using the Streamlined App, be prepared to change the frame one by one (Frame which begins with idxx) and execute the onLoad function. Personally, I find this method very convenient to run a quick test on any changes implemented. And once you're satisfied with the local changes, no more delay - Deploy it!Produces individual blog posts.