2

We're looking into refining our User Groups in Dynamics AX 2009 into more precise and fine-tuned groupings due to the wide range of variability between specific people within the same department. With this plan, it wouldn't be uncommon for majority of our users to fall user 5+ user groups.

Part of this would involve us expanding the default length of the User Group ID from 10 to 40 (as per Best Practice for naming conventions) since 10 characters don't give us enough room to adequately name each group as we would like (again, based on Best Practice Naming Conventions).

We have found that the main information seems to be obtained from the UserGroupInfo table, but that table isn't present under the Data Dictionary (it's under the System Documentation, so unavailable to be changed that way by my understanding). We've also found the UserGroupName EDT, but that is already set at 40 characters. The form itself doesn't seem to restricting the length of the field either. We've discussed changing the field on the SQL directly, but again my understanding is that if we do a full synchronization it would overwrite this change.

Where can we go to change this particular setting, or is it possible to change?

kingofzeal
  • 1,359
  • 3
  • 12
  • 24

2 Answers2

2

The size of the user group id is defined as as system extended data type (here \System Documentation\Types\userGroupId) and you cannot change any of the properties including the size 10 length.

You should live with that, don't try to fake the system using direct SQL changes. Even if you did that, AX would still believe that length is 10.

You could change the SysUserInfo form to show the group name only. The groupId might as well be assigned by a number sequence in your context.

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
  • Any thoughts on my post below? It seems like the AX designers hid the field, but there might still be a way to monkey with it. – Alex Kwitny Dec 15 '11 at 20:54
  • as Jan B. Kjeldsen says, it's not a good idea to try to fake the system. If you need a bigger field, just create another table and relate it to the standard one. In your table you can create whatever you want without the risk of breaking the system. If UserTable can't syncronize in AX, you can be in a situation where the AX client can't start and you have to delete objets from disk. – j.a.estevan Dec 16 '11 at 11:04
  • @j.a.estevan My method isn't exactly faking the system. If I could successfully increase the length via the system EDT, by all accounts it's correctly done. I personally would just create my own custom table as well, this is just more of a fun way to try and tweak the system. – Alex Kwitny Dec 16 '11 at 20:30
1

I wrote a job to change the string size via X++ and it works for EDTs, but it can't seem to find the "userGroupId". From the general feel of AX I get, I'd be willing to guess that they just have it in a different location, but maybe not. I wonder if this could be tweaked to work:

static void Job9(Args _args)
{
    #AOT
    TreeNode    treeNode;
    Struct                  propertiesExt;
    Map                     mapNewPropertyValues;

    void setTreeNodePropertyExt(
        Struct  _propertiesExt,
        Map     _newProperties
        )
    {
        Counter     propertiesCount;
        Array       propertyInfoArray;
        Struct      propertyInfo;
        str         propertyValue;
        int         i;
        ;

        _newProperties.insert('IsDefault', '0');

        propertiesCount     = _propertiesExt.value('Entries');
        propertyInfoArray   = _propertiesExt.value('PropertyInfo');

        for (i = 1; i <= propertiesCount; i++)
        {
            propertyInfo = propertyInfoArray.value(i);

            if (_newProperties.exists(propertyInfo.value('Name')))
            {
                propertyValue = _newProperties.lookup(propertyInfo.value('Name'));
                propertyInfo.value('Value', propertyValue);
            }
        }
    }
    ;

    treeNode    = TreeNode::findNode(#ExtendedDataTypesPath);

    // This doesn't seem to be able to find the system type
    //treeNode    = treeNode.AOTfindChild('userGroupId');
    treeNode    = treeNode.AOTfindChild('AccountCategory');

    propertiesExt = treeNode.AOTgetPropertiesExt();

    mapNewPropertyValues = new Map(Types::String, Types::String);
    mapNewPropertyValues.insert('StringSize', '30');

    setTreeNodePropertyExt(propertiesExt, mapNewPropertyValues);
    treeNode.AOTsetPropertiesExt(propertiesExt);

    treeNode.AOTsave();

    info("Done");
}
Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71