i want ‘Create Pick List’ on the Quick Order Flow Handling Menu to be visible (or not visible) based on the value of a custom field held against the Customer. Is there a way to achieve this?
Initially I was going to remove permission to it, and add in my own custom menu item which called the following code.
IF (CUSTOMER_CREDIT_INFO_CFP.Get_Cf$_Credit_Block(objkey_) <> 'Yes') THEN p1_ := Customer_Order_Transfer_API.Allowed_To_Send(ord_no_, 'ORDRSP'); Customer_Order_Flow_API.Check_All_License_Connected(p1_, ord_no_); attr_ := 'START_EVENT70ORDER_NO' || ord_no_ || 'END'; Customer_Order_Flow_API.Start_Create_Pick_List__(attr_); COMMIT; END IF;
These commands are shown in debug console when you create pick list from the QOFH screen, but don’t seem to work when i call them in a procedure. Appreciate any help with the code, or with applying criteria to menu items.
TIA. Chris.
Page 1 / 1
Chris,
Have you tried to push the coding in a deferred job. I know this may slow down the work for the user, but you might have a bit more controle over the deferred job.
Regards, Steve
Hi Chris
I am not aware of a way of controlling the visibility of standard menu items other that permissions as you suggest, or alternatively via a user profile (right-click, Properties, Advanced). Controlling this via a base profile might be preferable to security.
With regard to the code from a custom menu there are a few things to note. As far as i am aware the only fields that you can pass to the PL/SQL block as bind variables are from the base view for the screen you are on. For Quick Order Flow Handling the base view is CUSTOMER_ORDER. You can check the base view via system info.
Your code therefore has a number of issues because you are referring to variables such as objkey_ that are not declared.
The following may give you something to start with and work on
Consider the elements from the base view that you will need to pass and declare these. In this case Customer Number, Site (to get company) and Order Number
Then consider the elements that are not in the view but you will need to set to call functions or procedures. Here you will need company and objkey from cust cred info and an attribute variable
Then you are in a position to construct the main code block that as you have said, can largely be constructed by copying code from a debug.
To my knowledge the visibility of this custom menu (using the Condition Manager) only lets you use fields from the base view. One thing you may want to do is add an ELSE to the code to present a warning/error to alert the user that the pick has not been created.
Given the limitations mentioned above, i would perhaps look at another way to achieve your goal. For example you could surface a custom field on the QOFH screen that references your custom field from customer credit info. You could even use this in conditional formatting to make it clear to the user that this is a special status.