Posts

Showing posts from March, 2024

GET/SET different field values using JavaScript and generate unique name...

Image
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;         // Generate a unique ID based on customer name, loan type, and customer ID         var uniqueId =