Popular posts from this blog
How to Show Confirm Dialog Box using JavaScript? How to display a progre...
Code: function PromptDialog(executionContext) { var confirmStrings = { text: "Do you want to proceed?", title: "Confirmation", confirmButtonLabel: "Yes", cancelButtonLabel: "No" }; var confirmOptions = { height: 200, width: 400 }; Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then( function (success) { if (success.confirmed == true) { CallMethod(executionContext); // Pass executionContext if needed } else { // User clicked No } } );...
GET/SET different field values using JavaScript and generate unique name...
code: function generateUniqueName(executionContext) { // Get the form context from the execution context var formContext = executionContext.getFormContext(); // Get the values of the customer, bank account, and loan type fields var customerLookup = formContext.getAttribute("abc_customer").getValue(); var bankAccountLookup = formContext.getAttribute("abc_bankaccount").getValue(); var loanType = formContext.getAttribute("abc_loantype").getText(); // Check if a customer is selected and the loan type is "Personal Loan" or "Car loan" if (customerLookup && (loanType == "Personal Loan" || loanType == "Car loan")) { // Extract relevant information from the customer lookup field var customerName = customerLookup[0].name; var customerId = customerLookup[0].id; // Gener...
Comments
Post a Comment