tmannais
5th April 2019, 08:13
Hi,

In Session tdsls4100m900 (Sales Order), there is a field named Address (tdsls400.ofad).
When clicking zoom icon for the field, it pops up two options for the user to select which session to zoom into.
Currently, there are
1. Addresses
2. Addresses by Business Partner
I would like to use Extension or any other standard-approved ways to hide the 1. Addresses option.
So that when the user clicks zoom in this field, the system will automatically select the 2. Addresses by Business Partner session to zoom into without user seeing the zoom option window.
How can I achieve this?

Regards,
Thana

mark_h
8th April 2019, 15:30
In 4c4 you would zoom to a menu. I would see this by editing the forma and looking at that field. I could just change the zoom from menu to the specific session I wanted. Or I could then goto that menu - copy it to our VRC's and remove one of the options. I would assume LN is like that also - but that might be a bad assumption.

Ajesh
8th April 2019, 15:50
The Code finally calls the Menu tccom00009010 . So what you can do is create an Extension for that Menu and disable the specific Menu Field Item accordingly.

tmannais
9th April 2019, 06:42
In 4c4 you would zoom to a menu. I would see this by editing the forma and looking at that field. I could just change the zoom from menu to the specific session I wanted. Or I could then goto that menu - copy it to our VRC's and remove one of the options. I would assume LN is like that also - but that might be a bad assumption.

That might work but using Extension is preferred. I will definitely do this if all else fails.

The Code finally calls the Menu tccom00009010 . So what you can do is create an Extension for that Menu and disable the specific Menu Field Item accordingly.

I created the Menu Extension as you suggested, and put "return(false)" into the "Is Visible" Hook for the Standard Menu Items --> Addresses hoping to get rid of the menu but after saving, checking in, and committing nothing changes. So I have 2 questions from this.
1. What did I do wrong?
2. How to get the information that this zoom will finally call the Menu tccom00009010?

Ajesh
9th April 2019, 12:56
I created the Menu Extension as you suggested, and put "return(false)" into the "Is Visible" Hook for the Standard Menu Items --> Addresses hoping to get rid of the menu but after saving, checking in, and committing nothing changes. So I have 2 questions from this.
1. What did I do wrong?
2. How to get the information that this zoom will finally call the Menu tccom00009010?

Ok.. Surprisingly at my end also, there is the same problem.Its not going into the Extension script while putting in Debug

2. Have the source code so i can see. Anyways you can use Session, Print Where used Session and put the session,tccom4530m000 and just tick the Menu Part.

tmannais
24th April 2019, 11:36
In 4c4 you would zoom to a menu. I would see this by editing the forma and looking at that field. I could just change the zoom from menu to the specific session I wanted. Or I could then goto that menu - copy it to our VRC's and remove one of the options. I would assume LN is like that also - but that might be a bad assumption.

I finally tried this but it did not work as expected.
It gave me this error after clicking the zoom.

An internal error occurred. See details in UI server log file:
Error ID: 0da4SOBe
Error time: 2019-04-24 15:37:13

tmannais
24th April 2019, 13:23
After communicating with Infor for a while, they gave me a workaround for the issue.
They suggest to remove the authorization of the session that is needed to be hidden, but this will make the session actually inaccessible.
I don't know if it will work because I am not going to try it since the session is still needed. So in case anyone wants to try, there is your best bet.

mark_h
24th April 2019, 14:46
Must be another difference between 4c4 and LN. We modified several zoom menus to change what sessions were available. Not sure I like that work around either.

tmannais
25th April 2019, 12:18
I ended up trying the last method given by Infor.
After setting the authorization for that user to permit from accessing the session. The session indeed was inaccessible but the zoom menu still displayed both sessions, which is not what is expected.
So the solution does not work either.
Last thing I did to make it result in something most similar to what the requirement wants was to copy the standard menu to my Package VRC and customize the menu to change the sequence of the second menu to be the first one. This way, the user will now be able to click zoom and just click OK without having to select the second option because it is now the first one.
If anyone has any more ideas about this, please share.
For now I will be using this for a workaround.

Ajesh
26th April 2019, 10:52
Did they say anything about the Menu Extension about why it didnt go invisible?

tmannais
26th April 2019, 11:05
Did they say anything about the Menu Extension about why it didnt go invisible?

Yes. Here is what they replied.

We checked the standard script and observed that on zoom to tdsls400.pfad field, address menu is called through dll as below.

field.tdsls400.pfad:
before.zoom:
g.ret = tdgen.dll0001.start.addresses.menu(
tdsls400.pfbp,
tdsls400.pfad) |* ref


DllUsage (tdgen.dll0001.start.addresses.menu)
Expl.: This function will start a menu with the folowing sessions:
- Addresses (tccom4530m000)
- Addresses by Business Partner (tccom4133m000)

So you can't control the zoom field through extension as it is UI.

Alternative way to remove the authorization of session Addresses (tccom4530m000).

If user is DEM then given no authorization to this session and in case of AMS authorization give NOT AUTHORIZED to this session from session authorization by session.