Advertisements

SIEBEL: How to Open PDF or any file from Browser Script

Below code snippet is provided to open the Acrobat Reader file using browser script in Siebel.

function Applet_InvokeMethod (name, inputPropSet)
 var sURL,sShell;
 try
 {
 sURL = "http://docs.oracle.com/cd/E14004_01/books/PDF/DevDep.pdf";
 if(sURL == null || sURL == "")
 alert("URL not found.");
 else
 {
 sShell=new ActiveXObject("WScript.Shell");
 sShell.Run(sURL,1);
 }
 }//end try
 catch(e)
 {
 alert("Error in Applet_Invokemethod " + this.Name() + "\n" +
              e.toString() + " " + e.message + "\n" +
              "Error Code: " + (e.number & 0xFFFF));
    return("CancelOperation");
 }//end catch
 finally
 {
 sShell = null;
}//end finally
 }//end main

Advertisements


Categories: Siebel

Tags: , , , , , , ,

1 reply

  1. Hello Sir ! As you know that most of the browsers have stopped supporting NPAPI plugin (Acrobat,Java), I have an attachment applet which has button configured for Method =DrillDown, so when button is clicking by selecting an attachment record, custom code is written to open up PDF files/Non PDF files in a popup browser window by using NPAPI plugin support (Acrobat extension of browser opens up PDF file and Java extension opens up Non pdf files), now since Acrobat plugin support is gone (Firefox version 54 onwards), my custom code wouldn’t work to open PDF files. i have come across a library called PDF.js (https://mozilla.github.io/pdf.js/) which can be used to open PDF files even without Acrobat reader plugin, Could you please help me writing a PR/PM to use this file ?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: