bullhorn / novo-elements

UI Repository for Bullhorn's Novo Theme
http://bullhorn.github.io/novo-elements
MIT License
76 stars 61 forks source link

AppBridge OpenWindow Custom Tab #1484

Open rnitu opened 10 months ago

rnitu commented 10 months ago

At one point we were able to open up a record to a custom tab like below:

    this.appBridgeService.execute((appBridge: AppBridge) => {
      appBridge.open({
        type: 'record',
        entityType: EntityTypes.ClientCorporation,
        entityId: userId,
        tab: 'Custom Tab',
        passthrough: 'viewID=1234',
      });
    });

That has not worked for a while now, and wondering if we can get that feature back, or if there is a different way to open up a record to a custom tab.

Thank you!

davidkbh commented 7 months ago

The main difference here would be how you obtain an instance of the appBridge object. You can now construct an instance of it directly by providing an identifier for the current app. appBridge = new AppBridge('myApplication'); It's recommended you leave this instance available for future calls. From there, you can make open() calls directly. The only time this did not work for me was when the target tab name did not exist, so you may have to experiment to make sure "Custom Tab" is correct.

appBridge.open({
        type: 'record',
        entityType: EntityTypes.ClientCorporation,
        entityId: userId,
        tab: 'Custom Tab',
        passthrough: 'viewID=1234',
});
rnitu commented 7 months ago

Thank you for taking the time to respond.

I assume that this functionality is cluster dependent. It used to work like that for us in the past.

Now, in our instance, we need to have custom type, specify tab name in the passthrough, and have the redirect URI in the data key.

We got this to work via trial and error and observing how it is done in ATS, but it is not documented anywhere that I can find.

michael-amaya-bh commented 7 months ago

Hello, thanks for the feedback, we will find a place to document the current behavior so that you have a better reference next time. We do not plan on updating this back to previous functionality at this time.

platypusjones commented 6 months ago

@michael-amaya-bh is there any existing documentation on open or openList? I'm trying to understand the requirements to open a tab or list, and can't seem to locate any written documentation.

The example that @davidkbh outlined above, didn't get me far, so I've also resorted to observing internal calls to understand how the ATS is handling similar functionality.

VinceOPS commented 2 weeks ago

Hi everyone,

I am not sure if the issue is finally - really - a regression or not? Nor if some documentation has been written since @michael-amaya-bh 's message.

I am trying to open a custom tab too (on a Candidate) with no success for now. It works for standard tabs like "activity", but not for my custom tab (I tried all possible names, with/without upper letters, etc).

e.g. trying to open a custom tab "privacy" (Privacy):

ERROR D: NG04002: 'content/record/Candidate/9/privacy'
    at Wr.noMatchError (https://app.bullhornstaffing.com/_angular_router-17_3_10.js:3:63378)
    at https://app.bullhornstaffing.com/_angular_router-17_3_10.js:3:64071
    at https://app.bullhornstaffing.com/_angular_router-17_3_10.js:3:18867