Unified Service Desk has a concept of Entity Search, that allows you to store parameterized fetchxml and reuse this definition declaratively (say, in Windows Navigation Rules), or via DoSearch action of the Global Manager, or directly from your code.
One aspect that Entity Search does not deal well with is the searches returning multiple results. USD captures the first result only, indicates the total count in the $Return parameter and sets flag that more results are available. Documentation deflects to the “custom hosted controls”.
Dealing with multiple results is surprisingly simple. USD surfaces only the first result but captures all of them, and information is readily available.
protected override void DoAction( RequestActionEventArgs args) { if (args.Action.Equals("DealWithMultipleResults", StringComparison.OrdinalIgnoreCase)) { var results = GetDesktopRecord().EntityResults; // results are List<Entity>, deal with it // e.g. bind it to the grid and pop the window // in the FloatingPanel } }
Thanks. It is so frustrating that this documentation is no where to be found. USD docs are garbage.