cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Programmatically find latest votes for user on change task

@_1647
13-Aquamarine

Programmatically find latest votes for user on change task

Hi avillanueva,

Hi took Affected Objects from getChangeablesBefore(); but now I am facing an issue to get On Order, Disposition comment Work in progress and Finished.

To take get these values I am using AffectedActivityData affectedActivityData = (AffectedActivityData) Object;

but its not working.

Please help .

_1647_0-1723477069894.png

 

6 REPLIES 6
avillanueva
22-Sapphire II
(To:@_1647)

You asked about votes. This looks like a different question. Might want to start a new thread.

@_1647
13-Aquamarine
(To:avillanueva)

Could you please help me to get values for this

   On Order, Disposition comment,  Work in progress and Finished  programmatically.

avillanueva
22-Sapphire II
(To:@_1647)

QueryResult aResult=ChangeHelper2.service.getChangeablesBefore(ca,false);
Enumeration enumeration2=aResult.reset();
WTObject object=(WTObject)enumeration2.nextElement();
if (object instanceof AffectedActivityData)
{
AffectedActivityData aad=(AffectedActivityData)object;

from there you can get what you need:

onOrder=aad.getOnOrderDisposition().getDisplay();
wip=aad.getInventoryDisposition().getDisplay();
finished=aad.getFinishedDisposition().getDisplay();
dispositionComments=aad.getDispositionComments();
@_1647
13-Aquamarine
(To:avillanueva)

I am executing the same but from code it's not getting triggered I don't why and not getting printed 

avillanueva
22-Sapphire II
(To:@_1647)

@_1647 , I would start a new thread. Your questions are not related to the original post. 

@_1647
13-Aquamarine
(To:avillanueva)

Ok

Announcements

Top Tags