This should be really easy, but I am having trouble figuring it out. Whenever a change order state change event happens, I need to get the number of the change order. I've got the event hook all set up using the sub below, but I don't know how to get the change order's number. I thought it was this e.ReturnValue.Num but I get an error saying Object reference not set to an instance of an object.
Private
Sub UpdateChangeOrderLifecycleStateEvents(ByVal sender AsObject, ByVal e As UpdateChangeOrderLifeCycleStateCommandEventArgs)
Try
MsgBox("ECO Number=" & e.ReturnValue.Num)
Catch ex AsException
MsgBox(ex.Message)
EndTry
end sub
Solved! Go to Solution.
Solved by meck. Go to Solution.
I think I found out my problem. I was calling another routine before I was trying to get the number. Not sure if that was the problem or not but it seems to be working using e.ReturnValue.Num now.