Event PX how to get file name when file removed from attachment table using updatetableinfo event

Hi all,

I want to write a java px to get information of file name when file removed from attachment table.
This event will fire as IUpdateTableEventInfo.

But I am unable to get file information, I dont find any cell or properties by which my purpose get resolved.

my code looks like :

public EventActionResult doAction(IAgileSession session, INode actionNode,
IEventInfo eventinfo) {

String PxString=””;
IUpdateTableEventInfo objectEventInfo = (IUpdateTableEventInfo) eventinfo;

Iterator Seit=DTbl.iterator();
IEventDirtyRowUpdate Updaterow = null;
PxString = PxString + ” Row update event “;

try
{
while(Seit.hasNext())
{
PxString = PxString +” In WhileLOOP”;

Updaterow = (IEventDirtyRowUpdate)Seit.next();

if(Updaterow.getAction()==EventConstants.DIRTY_ROW_ACTION_DELETE)
{

PxString = PxString +” Action delete Captured”;

PxString = PxString +” get ref “+ Updaterow.getReferent().getName(); //return file folder name
PxString = PxString +” get getObjectVersion “+ Updaterow.getReferent().getObjectVersion();//return object version
PxString = PxString +” get ref cell file name “+ Updaterow.getReferent().getCell(1046);//return null
PxString = PxString +” get ref desc “+ Updaterow.getReferent().getCell(1045);//return null
IEventDirtyCell mycell[]= Updaterow.getCells();

for(IEventDirtyCell tempcell : mycell)
{
PxString = PxString+ ” Avl value “+ tempcell.getValue();
}//return null or nothing

PxString = PxString +” af cell value”;
//
Integer myatt[]= Updaterow.getAttributeIds();
for(Integer mm : myatt)
{
PxString = PxString+”att = ” + Updaterow.getCell(mm);

}//return null or nothing
}
}
}
catch(Exception exp)
{
return new EventActionResult(eventinfo, new ActionResult(ActionResult.STRING,”PX return “+PxString+”Exception is = “+exp.getStackTrace()));
}

I tried getcells and getattributeids also but they return null so my code didnt get into for loop.

Can anybody know how i get the file name/description/type from attachment table when user click on remove button.

Add Comment
3 Answer(s)

Yes, It is pre event.

Agile User Answered on May 23, 2019.
Add Comment

Was this resolved? I am facing a similar issue.

 

Can anyone help?

Agile User Answered on March 19, 2021.
Add Comment

Is this setup as a pre event? A post event won’t have dirty rows as the data will already be committed.

Agile Angel Answered on April 12, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.