Showing posts with label D365 Parameter Table code. Show all posts
Showing posts with label D365 Parameter Table code. Show all posts

Tuesday, 26 November 2019

D365 Parameter Table code

D365 Parameter Table code
Below are the find and exist methods of the parameter table.

public static ParameterTable find(boolean _forupdate = false)
    {
        ParameterTable parameter;

        if (_forupdate)
        {
            parameter.selectForUpdate(_forupdate);
        }

        select firstonly parameter
            index hint KeyIdx
            where parameter.Key == 0;

        if (!parameter && !parameter.isTmp())
        {
            Company::createParameter(parameter);
        }
        return parameter;
    }

    public static boolean exist()
    {
        return (select firstonly RecId from ParameterTable).RecId != 0;
    }

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...