on 03-31-2010 1:02 PM
Hi,
I am trying to make script to write retrived contents of My Master Agrement Page to Exel file.
I able to access classes and objects but not able to access interfaces.
Please post your views.
There are Java API's available to retrieve all the fields from a master agreement which in turn can be used to create an excel file as per you requirement.
Regarding your question on interfaces i am not very sure about what you are asking.
Every interface as an underlying implementation, which can be used in a script. Details about acessing the methods within an interface can be found in the javadocs.
If you are stuck with anything in particular, do post it here.
Regards,
Immanuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi vinay,
I guess you are trying to retrieve Details from a contract(master agreement) and display it on the screen for test purposes.
I suggest you do this for testing the retrieval of data from a document.
Firstly create a toolbar script for that particular document. In your case set the class as master agreement while creating the toolbar script. You can Test all your data retrieval scripting within this script.
You can start with a very simple script that displays the name of the document on the screen.
/doc is of type ContractIBeanIfc, therefore all the methods within the interface ContractIBeanIfc can be accessed through this object./
//Retrieves the Document name
docName=doc.getDisplayName();//getDisplayName is a method within the interface ContractIBeanIfc
//Prints the document name on the screen.
throw doc.createApplicationException(null,docName);
Once you have navigated to the particular document, run this script from the toolbar.
Regarding your Question on Exception handling.
You can use try catch blocks to catch Exceptions and print Custom messages.
example
try{
//Block of code
}
catch(e)
{
throw doc.createApplicationException(null,"Some Exception Occurred :"+e.getMessage());
}
*FOr test purposes this method should be ok, but the best practice would be to store the Exception message as a localised resource and pass the resource ID as a parameter to the method createApplicationException().
Hope this helps.
Regards,
Immanuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.