how to read/write comment for Change Order

how to read/write comment for Change Order

wesbird
Collaborator Collaborator
864 Views
3 Replies
Message 1 of 4

how to read/write comment for Change Order

wesbird
Collaborator
Collaborator

Hi, 

 

  I have to problem to read/write command for change order. 

  for read, I cannot find the funciton

  for write, there are a lot of function: AddComment, UpdateChangeOrder all should works, which one should I use

  when I play with UpdateChangeOrder, I have problem to construct Msg and MsgGroup. Here is my code:

 

            Msg msg = new Msg();
            msg.MsgTxt = "MsgTxt test";
            msg.Subject = "Subject abc";

            MsgGroup mg = new MsgGroup();
            mg.Msg = msg;

            MsgGroup[] msgs = new MsgGroup[] { mg };

            m_cache.Conn.WebServiceManager.ChangeOrderService.AddComment(co.Id, msgs, null);

 

  How I can make it works? 

 

 

 

Thanks

Wes

Windows 10 64 bit, AutoCAD (ACA, Map) 2023
0 Likes
Accepted solutions (2)
865 Views
3 Replies
Replies (3)
Message 2 of 4

minkd
Alumni
Alumni

What version of Vault Pro are you using?

What error do you get?    The full exception from the vlog would be helpful.

What state is the change order in?    Only users with certain routing-roles can add comments in certain change order states See this for details.

 

-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
0 Likes
Message 3 of 4

wesbird
Collaborator
Collaborator
Accepted solution

Hi Dave:

 

  It works now. I did not remember I change anything. 

  It's Vault Pro 2014. 

  I did not check vlog yesterday, here it is: 

 

2014-07-10 1:42:04 PM *******************************************************************
Error: Soap Exception ( mesg-id = 635405965241209577 )
Exception: NullMsgComponents [1686]
Stacktrace:
Server stack trace:
at Connectivity.Process.Services.ChangeOrderService.UpdateChangeOrder(Int64 coId, String changeOrderNumber, String title, String description, DateTime approveDeadline, Int64[] addItemMasterIds, Int64[] delItemMasterIds, Int64[] addAttmtMasterIds, Int64[] delAttmtMasterIds, Int64[] addFileMasterIds, Int64[] delFileMasterIds, PropertyInstance[] addProperties, Int64[] delPropDefIds, ForumMessage[] comments, ArrayList[] commentFileAttachs, ForumMessageEmail[] notifyEmails, AssociationPropertyItem[] addAssocProperties, Int64[] delAssocPropIds, Int64 routingId, ArrayList addUserIds, ArrayList addRoleIds, ArrayList delUserIds, ArrayList delRoleIds)
at System.Runtime.Remoting.Messaging.Message.Dispatch(Object target)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Connectivity.Process.Services.ChangeOrderService.UpdateChangeOrder(Int64 coId, String changeOrderNumber, String title, String description, DateTime approveDeadline, Int64[] addItemMasterIds, Int64[] delItemMasterIds, Int64[] addAttmtMasterIds, Int64[] delAttmtMasterIds, Int64[] addFileMasterIds, Int64[] delFileMasterIds, PropertyInstance[] addProperties, Int64[] delPropDefIds, ForumMessage[] comments, ArrayList[] commentFileAttachs, ForumMessageEmail[] notifyEmails, AssociationPropertyItem[] addAssocProperties, Int64[] delAssocPropIds, Int64 routingId, ArrayList addUserIds, ArrayList addRoleIds, ArrayList delUserIds, ArrayList delRoleIds)
at Connectivity.Web.Services.v18.ChangeOrderService.UpdateChangeOrder(Int64 changeOrderId, String changeOrderNumber, String title, String description, DateTime approveDeadline, Int64[] addItemMasterIds, Int64[] delItemMasterIds, Int64[] addAttmtMasterIds, Int64[] delAttmtMasterIds, Int64[] addFileMasterIds, Int64[] delFileMasterIds, PropertyInstance[] addProperties, Int64[] delPropDefIds, ForumMessageGroup[] addComments, ForumMessageEmail[] notifyEmails, AssociationPropertyItem[] addAssocProperties, Int64[] delAssocPropIds, Int64 routingId, RoutingRoleMap[] addMembers, RoutingRoleMap[] delMembers)
at SyncInvokeUpdateChangeOrder(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

 

  I will remember check vlog more later. 

 

 

 

Thank you for your time

Wes

 

Windows 10 64 bit, AutoCAD (ACA, Map) 2023
0 Likes
Message 4 of 4

minkd
Alumni
Alumni
Accepted solution

FYI: That particular error is only thrown when a MsgGroup with a Msg is provided, but the Msg has either a null Subject or null MsgTxt.

 

-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
0 Likes