Author Topic: PSDK: CfgFolderQuery return multiple folder  (Read 3254 times)

Offline newsG

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
PSDK: CfgFolderQuery return multiple folder
« on: December 15, 2021, 08:45:31 AM »
I would like to query "Agent" folder under person type as code below:

[code]CfgFolderQuery qfolder = new CfgFolderQuery();
qfolder.Name = "Agent";
qfolder.Type = (Int32)CfgObjectType.CFGPerson;
qfolder.OwnerDbid = 1;
CfgFolder folder = service.RetrieveObject<CfgFolder>(qfolder);[/code]

However, "Agent" is under multiple group

[b]Folder[/b]
TEAM A
--> Agent
TEAM B
--> Agent

Database also return nothing different except dbid.
[quote]dbid name type owner_dbid owner_type state csid owner_csid description folder_class custom_type
626 Agent 3       1         7       1    0           0         NULL     1                 0
892 Agent 3       1         7       1    0           0         NULL     1                 0[/quote]

There are any way to query specific folder under "TEAM A" ?
I don't want to use dbid because admin can add TEAM C, TEAM D and so on that I must create mapping file to map between folder and dbid everytime when they have new folder

Thanks in advance.