IHonest Blog

Harnessing Microsoft Power for Expert Business and Technical Solutions

Construction and Real Estate

MS Dynamics Customer Engagement combined with Power Platform offers a robust solution for construction and real estate businesses, enabling them to effectively manage operations, enhance customer interactions, and drive growth. Here are ten detailed real-time scenarios and solutions showcasing their benefits:

Read More

Insurance Service Provider

MS Dynamics CRM and the Power Platform provide significant advantages for the insurance industry, enabling companies to enhance customer relationships, streamline operations, and achieve better business outcomes. Here's how they help insurance businesses:

Read More

Masking Field Values (e.g., Credit Card Numbers) in MS Dynamics CRM

Custom JavaScript: Code Sample

//Open the form customization interface.
//Locate the OnLoad event in the form's properties.
//Add the JavaScript code to the OnLoad event's script editor.
//Save and Publish customizations
//Remember to replace "new_cardnumber" with the actual schema name of your card number field

function maskCardDetails() {
    var cardNumberField = Xrm.Page.getAttribute("new_cardnumber"); // Replace with your field name
    if (cardNumberField) {
        var cardNumber = cardNumberField.getValue();
        if (cardNumber) {
            var maskedCardNumber = "**** **** **** " + cardNumber.slice(-4);
            cardNumberField.setValue(maskedCardNumber);
        }
    }
}

// Attach the function to the form's OnLoad event
Xrm.Page.data.entity.addOnLoad(maskCardDetails);

Read More