Question

Custom menu illegal SQL error

  • 14 January 2020
  • 5 replies
  • 537 views

Userlevel 4
Badge +9

I am trying to create a custom menu RMB on the Sales Part screen in IFS Apps 8.
I want it to go to the Purchase Order Lines screen and pass in a part number as a parameter.
I am using the code below which looks OK. If I paste "ifsapf:tbwPurchaseOrderLine?COMPANY=100" into the address bar of IFS it goes to that screen.

SalSendMsg(hWndMDI, PM_Navigate, METHOD_Execute, SalHStringToNumber('ifsapf://tbwPurchaseOrderLine?COMPANY=100?PART_NO=' ||hWndForm.frmSalesPart.dfsPartNo))

I have a screen cap of the custom event here:https://ibb.co/94wyd5R

I am getting the error below when I execute it. I definitely have the permissions under the profile I am logged in to IFS. Can anyone help? Thank you.

Illegal SQL rejected: ifs.fnd.services.plsqlserver.service.security.RejectedSqlException: ILLEGALFUNC:Illegal function: HWNDMDI

 


5 replies

Userlevel 6
Badge +14

@jdoherty 

I dont know about app 8, but in app 9 you do it like this

 

Userlevel 4
Badge +9

Thank you for your reply Hans. I know how to open a window from a custom menu (like you have shown) but I need to use a plsql block to do it because I want the Purchase order Line form to open and show me lines that have the part number I have passed in as a parameter but in descending order.

This is not possible with an action type of Create Window with transfer, it has to be a PLSQL block.

For a start I just want it to display the part number I pass in as a parameter and then add the descending condition. I think I know why my code doesn’t work anyway; it is because I don’t have Centura TeamDeveloper installed. I believe I need this software installed on the server in order for the function SalHStringToNumber to work? Can someone confirm this please?

Thank you.

Userlevel 5
Badge +11

Hi @jdoherty,

SalSendMsg is not a SQL method. It is a method used in the PPJ framework and it used in the client development. So, you won’t be able to use that method in the plsql block as plsql block expects only sql statements.

Userlevel 2
Badge +3

Hi @jdoherty ,

 

Are you able to fix this issue?

 

Thanks,

Jagan.

 

Userlevel 4
Badge +9

Hi @jdoherty ,

 

Are you able to fix this issue?

 

Thanks,

Jagan.

 

No I was not unfortunately 

Reply