App-Open Not Respecting Layer?

I added a customization layer to Customer to default the Territory Source to “Synchronize to Customer” when adding a new ShipTo. Added the layer to all menu entries for Customer and this works fine.

But Customer is also called from Order Entry by choosing “Customer ShipTo Entry” from the overflow menu. So I copied the Onclick event for NewShipTo to a new event and changed the trigger on the new event to be an override for the old event.

In the app-open settings, I added the layer name. I know this is working because if I intentionally mis-spell the layer name, I’ll get an error saying it can find no menu entry with that layer name when trying to launch “Customer ShipTo Entry” from the overflow menu.

But once it is open, the layer on Customer is not having any effect - the Territory Source is not defaulting to “Synchronize to Customer” when trying to add a new shipto address.

Is there a known issue w/app-open properly respecting layers?

When I try this now, I get the new error about no such menu combo available. I think this was the big changes that caused some heartache right around the end of the year.

see her:

there were quite a few others too

In my case, the issue is not the "There is no active menu…” error. I have tried replacing the app name and layer name with just a menuID and it also launches Customer, but it still has the same issue that the layer on Customer is not having any effect.

You do have the layer assigned at the menu level though or no?

Yes, the layer is applied to all the menu entries for Customer.

The problem isn’t with your app-open/layer combination… the problem is your event on your Customer layer isn’t being called (and to be honest, based on your trigger, I can’t figure out why).

When you open Customer Ship-To via Order Entry… notice it is a different looking form:

The onclick event in Order Entry has the following “Value In” property:

{
"OpenPage": "Slider.NewCustomerShipTo",
"CustomerID": "{OrderHed.ShipToCustId}",
"ShipToID": "{OrderHed.ShipToNum}"
}

So… note that it is ACTUALLY opening a specific page from CustomerEntry… Slider.NewCustomerShipTo

If you look at Customer Entry, in App Studio, there is the standard ShipTo > Detail page, which is what we see when we edit Ship-To records from within Customer Entry.

BUT… if you navigate to Customer Ship To from Order Entry… it is actually calling the slider panel “Customer Ship To Maintenance”.

This doesn’t appear to be an issue. Clicking the “new” button here (although a different “tool”) calls the same GetNew events (as far as I can tell).

The “GetNewShipTo” event which was your event’s trigger is still being called… so your event running after that SHOULD still work. But I tested that, and I couldn’t get my event to fire either. Again… still not sure why. :enraged_face: GetNewShipTo still fires, so an event called “after” that should as well. :man_shrugging:

Working through subsequent events, there is one called “AfterGetNew”. And This is were we see the paths diverge (slightly).

Notice there is a condition: {TransView.NewCustomerShipTo} === true

Depending on that it sends you either to an event called “AfterGetNewForCustomer”… OR… “AfterGetNewForShipToSlider”

Knowing now, that’re we’re dealing with the “Slider branch”… I made a copy of the event we’re working with and set the trigger to after the “AfterGetNewForShipToSlider” event.

In this case, the event still failed because the dataview check (condition) we were using was coming back undefined. So I just deleted the condition from the event:

Now it works:

SO… long-story-short…

On you Customer form, copy your “SYNC” event, and set the trigger to Event > After > AfterGetNewForShipToSlider

Only include your row update.

Now you can test and see if it works. NOTE: The App-Open event in Order Entry is only going to see the PUBLISHED layer on Customer. So, since we made a new event on Customer, make sure you PUBLISH that change, so it is picked up when you test coming from Order Entry.

Wow…that was masterful sleuthing! That added slider event did the trick!

It’s somewhat concerning that there may be different events called depending on the context (slider vs. new tab). I can kinda sorta see that there might be theoretical value in doing so, but on a practical level its another headache to watch out for. :face_with_raised_eyebrow: