Posts

Require Field Based on Another Field Value using JS

Require Field Based on Another Field Value   //OnChange Event To update function Customer_Mobile_Onchange ( executionContext ) {     debugger ;     var formContext = executionContext . getFormContext ();     var fieldControl = formContext . getAttribute ( "cr601_no" );     if ( fieldControl != null && fieldControl != undefined && fieldControl != "" )     {         var currentName = fieldControl . getValue ();         if ( currentName != "" && currentName != null && currentName != undefined )         {             var mobilenoControl = formContext . getAttribute ( "cr601_mobileno" );             mobilenoControl . setRequiredLevel ( "required" );             var mobilenoControl = formContext . getAttribute ( "cr601_state" );   ...

Retrieve Value from Lookup Field using Java Script

Image
Hi Readers, Step 1: Create a JavaScript as mentioned below. Function Name: retrive_customer_lookup Pass parameter in function to access exiting context(Data) on record. cr601_customername   replace with Lookup field Logical Name. customername_fieldControl  store GUID of Customer Name Lookup Field. Step 2: Write down the code in java script. function retrive_customer_lookup(executionContext) {     debugger;        var formContext = executionContext.getFormContext();     var customername_fieldControl = formContext.getAttribute(" cr601_customername ").getValue()[0].id.slice(1, -1);//;     if (customername_fieldControl !=null && customername_fieldControl != undefined && customername_fieldControl != "")     {         var req = new XMLHttpRequest();         req.open("GET", Xrm.Utility.getGlobalContext().getClientUrl() + "/api/data/v9.2/cr601_customerdetails("+cus...

Updating Field Values with a Button in PowerApps using JavaScript

Image
In the world of low-code and no-code development, PowerApps is a powerful tool for building custom business applications without the need for coding expertise. In this blog post, we'll explore a practical scenario where we demonstrate how to update field values using a button in PowerApps. Step 1: Open the PowerApp Portal and select the appropriate environment. Step 2: Select the Model-driven app where you want to add an action. Step 3: Right-click on the app file and choose the "Edit" option. Step 4: Within the app, select the desired page, right-click, and then choose "Edit Command Bar" from the list of options. Step 5: Locate the "Main Form" and click on the "Edit" button. Step 6: Click on the "New" button, as indicated in the image, and select "Command." Step 7: After creating the button, add properties such as Label and Icon, as shown below. Step 8: For JavaScript functionality, use the properties mentioned below. Ste...