Skip to content

MCP save_user_groups cannot set the group type, so a company account created over MCP never lists in the Swift CSR Accounts app #697

Description

@Justinvolved

Describe the bug

save_user_groups has no member for the user group type (AccessUserUserAndGroupType, for example SystemAccount). Groups created with it are stored with a NULL type. The stock Swift CSR Accounts page (UserGroups module, ListGroupType=SystemAccount) lists only groups of type SystemAccount, so a company account created over MCP never appears there, and the sales-on-behalf flow cannot reach it.

To Reproduce

  1. tools/list, read the inputSchema of save_user_groups.
  2. save_user_groups {"groups":[{"id":0,"name":"TEST-ACCOUNT","parentGroupId":0}]}.
  3. SELECT AccessUserId, AccessUserType, AccessUserUserAndGroupType FROM AccessUser WHERE AccessUserUserName='TEST-ACCOUNT'.
  4. Compare with the stock account groups and with the CSR Accounts paragraph settings.

Observed (DW 10.28.11, MCP add-in 0.6.0-BETA):

save_user_groups item members: address, allowBackend, city, companyName, country, customerNumber,
  emailAddress, id, image, jobTitle, name, parentGroupId, state, telephone, zipCode   (no type member)
save_user_groups -> {"items":[{"id":100104,"name":"TEST-ACCOUNT","parentGroupId":0,...}],"succeeded":1}
AccessUser       -> 100104 | AccessUserType 2 | AccessUserUserAndGroupType NULL
stock account groups -> AccessUserType 2 | AccessUserUserAndGroupType SystemAccount (5 rows)
CSR Accounts paragraph (UserGroups module) -> <ListGroupType>SystemAccount</ListGroupType>

Expected behavior

save_user_groups accepts the group type (the values the admin UI offers), so an account group created over MCP is a SystemAccount group and lists in the CSR Accounts app. get_user_groups returns the type as well.

Environment

  • Dynamicweb 10.28.11 (.NET 10 hosting), Swift 2.4
  • MCP add-in 0.6.0-BETA

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions