Quantcast
Channel: Reports & Macros
Viewing all articles
Browse latest Browse all 1142

Macro Context.getSelectedObjects() method not working

$
0
0

Hello ,

I am trying to execute a report on creation of a object. I created a macro and used Context.getSelectedObjects() to get the recently created object .But the above method returns empty value. Below my code details.

var objOCC=Context.getSelectedObjOccs()[0];// This is returning empty value
var execProp=Report.createExecInfo("xxxx-xxxx-xxx-xx-xxx",[objOCC],getSelectedLanguage());
var result=Report.execute(execProp,false);

If I change the code ,

var objDef = Context.getSelectedObjects()[0];// This is returning the object
var execProp=Report.createExecInfo("xxxx-xxxx-xxx-xx-xxx",[objDef ],getSelectedLanguage());
//Failing to execute below line,
var result=Report.execute(execProp,false);

Please Help

Regards,

Kartik Sarangi

Tags: 

Viewing all articles
Browse latest Browse all 1142

Trending Articles