Sendkeys Issue in Role Tailored Client

jigneshdhandhajigneshdhandha Member Posts: 41
edited 2013-10-05 in NAV Three Tier
Dear All

I want to Combine Purchase Order and Quantity Explosion of BOM Report.For that I have added Code in Report - OnPostReport of Report 405 Order.

QtyExpBOM_gRpt.RUNMODAL;
IF NOT ISSERVICETIER THEN BEGIN
IF ISCLEAR(WshShell_gAut) THEN
CREATE(WshShell_gAut);
WshShell_gAut.SendKeys('%v');
END ELSE BEGIN
IF ISCLEAR(WshShell_gAut) THEN
CREATE(WshShell_gAut);
WshShell_gAut.SendKeys('%r');
END;

Variable Name : WshShell_gAut
DataType : Automation
SubType : 'Windows Script Host Object Model'.WshShell

In Classic I am Running Purchase Order Report that time I am Only Press Alt+V after that Purchase Order Output is Generated and Due to Code on OnPost Trigger Quantity Explosion of BOM Report Output is Generated But This Output is Automatic Generated For that I dont need to Press Alt+V So Sendkeys Work on Classic But This Sendkeys not Working in Role Tailored Client.

In Classis Sendkeys Working Properly but In RTC Not Working For this Case.

Any Solution.....

Comments

  • geordiegeordie Member Posts: 655
    Give a try changing OnClient property of create function.
    I use this code in RTC (page) and works like a charm:
    IF ISCLEAR(WSHShell) THEN
      CREATE(WSHShell,FALSE,TRUE);
    
    WSHShell.SendKeys('^+U');
    
    CLEAR(WSHShell);
    
  • jigneshdhandhajigneshdhandha Member Posts: 41
    Hi Geordie

    I am also try this
    But not Working....

    Thanks....
Sign In or Register to comment.