Querying menu details over REST

Am I overlooking something when I try to pull detail for all menus from /Ice.BO.MenuSvc/Menus? Or looking in the wrong place? I’m only getting the first five menu records back, except when there’s a filter set to pick some other specific menu.

BAQ isn’t going to cut it. The fields in Ice.Menu it knows about haven’t been updated in so long it’s missing over 1/3 of them, and I need to know some of those things.

1 Like

If anyone has a couple of minutes to kill and would like to acquire my eternal gratitude, do you get the same result from /Ice.BO.MenuSvc/Menus in REST? I only get a max of five records. Trying to hack out more with broadly selective filters doesn’t work. Unexpectedly, saying orderby=MenuDesc resulted in 43 records, or 37, or 58 so maybe it’s a :mage: :beetle:.

Support’s been poking at this going on four months, it might help if I can say that others are or are not seeing the same thing.

Try direct rpc method, getRow or getList, if this makes any difference

1 Like

Just curious if the timing of an equivalent BAQ and the BAQSvc… :thinking:

Or an Epicor Function that returns the same. :person_shrugging:

75ms run time ( output2 = JsonConvert.SerializeObject(Db.Menu.ToList()); )

return took a little longer

I can’t get any results.

Very curious. Why do you think it’s missing menu items?

1 Like

Neither ever returned in REST, called in a function:

Db.Menu.ToList() → 75ms
GetList → 95ms
GetRows → 137ms

So what method is used to get menu in homepage? Some getRowsEx?

I haven’t looked at the homepage, but classic uses GetRowsTranslated.

At the time rest results included dozens more fields than BAQ. I did notice that URL has shown up in BAQ since then and it wasn’t there before, so that’s different now. I’ll check again tomorrow, I’m currently away from my work computer.

Okay, technically, like 14 inches away (not sure how many bananas that is, apologies to the other 95% of the world), but, you know, boundaries.

1 Like

No rush: 2 good size :banana: :banana:

Rest/service call for menu does so much more than just db query - license checking, permission checking, etc.

So my point is - if you want to get the results that client app gets - just use the same service method call.

3 Likes

Here’s a quick diff (2024-06-27). The BAQ list is up to date through version 2024.1.5.

| BAQ (Ice.Menu)     | REST (Ice.BO.MenuSvc/Menus) |
|--------------------+-----------------------------|
| Company            | Company                     |
| MenuID             | MenuID                      |
| MenuDesc           | MenuDesc                    |
| ParentMenuID       | ParentMenuID                |
| Sequence           | Sequence                    |
| OptionType         | OptionType                  |
| OptionSubType      | OptionSubType               |
| Program            | Program                     |
| Enabled            | Enabled                     |
| SecCode            | SecCode                     |
| DoNotDisplayInMenu | DoNotDisplayInMenu          |
| Arguments          | Arguments                   |
| Module             | Module                      |
| MenuType           | MenuType                    |
| CGCCode            | CGCCode                     |
| DashboardID        | DashboardID                 |
| ExpressAvailable   | ExpressAvailable            |
| SystemCode         | SystemCode                  |
| OldProgram         | OldProgram                  |
| Comment            | Comment                     |
| Status             | Status                      |
| CRMMenu            | CRMMenu                     |
| SystemFlag         | SystemFlag                  |
| SysRevID           | SysRevID                    |
| SysRowID           | SysRowID                    |
| SaaSParam          | SaaSParam                   |
| CompanyVisibility  |                             |
| WebResourceURL     | WebResourceURL              |
| DefaultFormType    | DefaultFormType             |
| Alias              | Alias                       |
| RunOnClassic       | RunOnClassic                |
|                    | Dashboard                   |
|                    | DeveloperMode               |
|                    | Extension                   |
|                    | Options                     |
|                    | ReadOnly                    |
|                    | Customization               |
|                    | AllCompanies                |
|                    | ShowWebNavBar               |
|                    | ValidateBeforeLaunch        |
|                    | CustomizationKinetic        |
|                    | CanModify                   |
|                    | FormName                    |
|                    | Kinetic                     |
|                    | ProgramKinetic              |
|                    | CustomizationType           |
|                    | Select                      |
|                    | IsDuplicate                 |
|                    | BitFlag                     |
|                    | RowMod                      |

What I’m working on is auditing menus before and after the update coming up next month. I’m using external tools for that, mainly because there’s a lot of work required to deduce what services a menu is aliasing and connecting the dots between redundant menus.

Menu configurations change over updates, new alias duplicates turn up. I like to find them and get them aligned before my users trip over something and tell me it’s broken!

1 Like

The BAQ is showing what’s in the table. Those extra fields are coming from Epimagic.

1 Like

Those fields are External, so are filled in the code.
If I run this SQL query, I see them all as external
select [External], * from Ice.ZdataField where DataTableID=‘Menu’
order by Seq
image

1 Like

Aha! That answers one mystery about where those values go. How does one query the value of those external fields for menus?

Run GetRows

{
    "Menu": [
        {
            "ColumnNames": 0,
            "Company": "",
            "MenuID": "AMGO0189",
            "MenuDesc": "Package Control ID",
            "ParentMenuID": "AMMN1000",
            "Sequence": 180,
            "OptionType": "I",
            "OptionSubType": "E",
            "Program": "Erp.UI.PkgControlIDEntry.dll",
            "Enabled": true,
            "SecCode": "SEC189",
            "DoNotDisplayInMenu": false,
            "Arguments": " -KineticUI",
            "Module": "AM",
            "MenuType": "MAINMENU",
            "CGCCode": "",
            "DashboardID": "",
            "ExpressAvailable": true,
            "SystemCode": "ERP",
            "OldProgram": "",
            "Comment": "",
            "Status": "",
            "CRMMenu": false,
            "SystemFlag": true,
            "SysRevID": 332283796,
            "SysRowID": "28445988-d8ad-48e8-aa6f-69a23366a85f",
            "SaaSParam": "NAD~SMT~DT",
            "WebResourceURL": "metafx/#/view/Erp.UI.PkgControlIDEntry",
            "DefaultFormType": "Base",
            "Alias": null,
            "RunOnClassic": false,
            "Dashboard": "",
            "DeveloperMode": false,
            "Extension": "",
            "Options": "",
            "ReadOnly": false,
            "Customization": "",
            "AllCompanies": true,
            "ShowWebNavBar": false,
            "ValidateBeforeLaunch": false,
            "CustomizationKinetic": "",
            "CanModify": true,
            "FormName": "",
            "Kinetic": false,
            "ProgramKinetic": "",
            "CustomizationType": "",
            "Select": false,
            "IsDuplicate": false,
            "BitFlag": 0,
            "RowMod": "",
            "SpecifiedProperties": "////////AA==",
            "UserDefinedColumns": {}
        }
    ]
}

1 Like

Pardon my ignorance - can I return that in a BAQ? More to the point, over REST, that’s what I’m aiming for.

1 Like

I ran it in a function and returned it over REST.

You could do the same in a BAQ with a little work.

3 Likes