Friday, February 17, 2023

Mask value in D365FO X++

 public str mask(str _element)

    {

        str result;

int maskLength = 8;

int elementLength = strLen(_element);

            int elementLenghtWillBeMasked = elementLength - maskLength;

            str elementValueKept = strDel(_element, 0, elementLenghtWillBeMasked);

            str elementValueMasked;


            while (elementLenghtWillBeMasked > 0)

            {

                elementValueMasked = elementValueMasked + 'X';

                elementLenghtWillBeMasked--;

            }


            result = elementValueMasked + elementValueKept;


        return result;

    }

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...