set default dimension value

public static RecId getNewDefaultDimension(RecId defaultDimension, Name dimName, str 255 dimValue)
    container c;
    RecId newdefaultDimension;
    int i;

    c = AxdDimensionUtil::getDimensionAttributeValueSetValue(defaultDimension);
    i = conFind(c, dimName);
    if (!i && !dimValue)
        return defaultDimension;
    if (i)
        c = conDel(c, i+1, 1);
        c = conDel(c, i, 1);
    if (dimValue)
        c += dimName;
        c += dimValue;

    c = conDel(c, 1, 1);
    c = conIns(c, 1, conLen(c) / 2);
    newdefaultDimension = AxdDimensionUtil::getDimensionAttributeValueSetId(c);

    return newdefaultDimension;

One thought on “set default dimension value

  1. What’s up,I read your blogs named “set default dimension value | hello Dynamics AX” like every week.Your writing style is witty, keep up the good work! And you can look our website about proxy server list.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s