Transfer Order Updation for Web Service for NAV2009

marvindmarvind Member Posts: 25
edited 2013-05-31 in NAV Three Tier
Hi Freddy,

thanks for your reply,

I am facing the following error in transfer order.

In navision i am facing the error
Another user have modified the record for this transfer header after you received it form database.Enter your changes in the updated window, or start the interrupted activity again,Identification fields and values"

In Dot.net i am facing the error
"Other user has modifyed "Transfer _Order" "No=const(1042)"

here i am sending my code below for your ref.

This Method Get the Value in Business Class
#region Line
Item_No = Transfer_Order_Line.GetProperty("Item_No");
Description = Transfer_Order_Line.GetProperty("Description");
Derived_From_Line_No = Transfer_Order_Line.GetProperty("Derived_From_Line_No");
Quantity = Transfer_Order_Line.GetProperty("Quantity");
Transfer_Price = Transfer_Order_Line.GetProperty("Transfer_Price");
Amount = Transfer_Order_Line.GetProperty("Amount");
Reserved_Quantity_Inbnd = Transfer_Order_Line.GetProperty("Reserved_Quantity_Inbnd");
Reserved_Quantity_Shipped = Transfer_Order_Line.GetProperty("Reserved_Quantity_Shipped");
Reserved_Quantity_Outbnd = Transfer_Order_Line.GetProperty("Reserved_Quantity_Outbnd");
Unit_of_Measure = Transfer_Order_Line.GetProperty("Unit_of_Measure");
Qty_to_Ship = Transfer_Order_Line.GetProperty("Qty_to_Ship");
Quantity_Shipped = Transfer_Order_Line.GetProperty("Quantity_Shipped");
Qty_to_Receive = Transfer_Order_Line.GetProperty("Qty_to_Receive");
Quantity_Received = Transfer_Order_Line.GetProperty("Quantity_Received");
Assessable_Value = Transfer_Order_Line.GetProperty("Assessable_Value");
#endregion Line
This Method Set the Value in Business Class

#region Set Values

Item_No = Transfer_Order_Line.GetProperty("No");
Description = Transfer_Order_Line.GetProperty("txtDescription");
Derived_From_Line_No = Transfer_Order_Line.GetProperty("txtDerivedFromLineNo");
Quantity = Transfer_Order_Line.GetProperty("txtQuantity");
Transfer_Price = Transfer_Order_Line.GetProperty("txtTransferPrice");
Amount = Transfer_Order_Line.GetProperty("txtAmount");
Reserved_Quantity_Inbnd = Transfer_Order_Line.GetProperty("txtReservedQuantityInbnd");
Reserved_Quantity_Shipped = Transfer_Order_Line.GetProperty("txtReservedQuantityShipped");
Reserved_Quantity_Outbnd = Transfer_Order_Line.GetProperty("txtReservedQuantityOutbnd");
Unit_of_Measure = Transfer_Order_Line.GetProperty("txtUnitofMeasure");
Quantity_Shipped = Transfer_Order_Line.GetProperty("txtQuantityShipped");
Qty_to_Receive = Transfer_Order_Line.GetProperty("txtQtytoReceive");
Quantity_Received = Transfer_Order_Line.GetProperty("txtQuantityReceived");
Assessable_Value = Transfer_Order_Line.GetProperty("txtAssessableValue");
if (len != k)
{
TransferOrderLine1 = OrderLineList.GetValue(k);
txtItemNo.Text = Convert.ToString(Item_No.GetValue(TransferOrderLine1, new object[] { }));
txtDescription.Text = Convert.ToString(Description.GetValue(TransferOrderLine1, new object[] { }));
txtDerivedFromLineNo.Text = Convert.ToString(Derived_From_Line_No.GetValue(TransferOrderLine1, new object[] { }));
txtQuantity.Text = Convert.ToString(Quantity.GetValue(TransferOrderLine1, new object[] { }));
txtTransferPrice.Text = Convert.ToString(Transfer_Price.GetValue(TransferOrderLine1, new object[] { }));
txtAmount.Text = Convert.ToString(Amount.GetValue(TransferOrderLine1, new object[] { }));
txtReservedQuantityInbnd.Text = Convert.ToString(Reserved_Quantity_Inbnd.GetValue(TransferOrderLine1, new object[] { }));
txtReservedQuantityShipped.Text = Convert.ToString(Reserved_Quantity_Shipped.GetValue(TransferOrderLine1, new object[] { }));
txtReservedQuantityOutbnd.Text = Convert.ToString(Reserved_Quantity_Outbnd.GetValue(TransferOrderLine1, new object[] { }));
txtUnitofMeasure.Text = Convert.ToString(Unit_of_Measure.GetValue(TransferOrderLine1, new object[] { }));
txtQtytoShip.Text = Convert.ToString(Qty_to_Ship.GetValue(TransferOrderLine1, new object[] { }));
txtQuantityShipped.Text = Convert.ToString(Quantity_Shipped.GetValue(TransferOrderLine1, new object[] { }));
txtQtytoReceive.Text = Convert.ToString(Qty_to_Receive.GetValue(TransferOrderLine1, new object[] { }));
txtQuantityReceived.Text = Convert.ToString(Quantity_Received.GetValue(TransferOrderLine1, new object[] { }));
txtAssessableValue.Text = Convert.ToString(Assessable_Value.GetValue(TransferOrderLine1, new object[] { }));
}
else
{
break;
}

k++;
#endregion Set Value
This will update the recoed form my GUI

#region Update Transfer Order Button Click
protected void imgbtnUpdate_Click(object sender, ImageClickEventArgs e)
{
BO_TransferOrder TransferOrder = new BO_TransferOrder();
try
{
TransferOrder.Create(this.Page);
HException.Value = "Transfer Oreder Update";
}
catch (Exception ex)
{
if (ex.InnerException != null)
{
HException.Value = ex.InnerException.Message;
}
else
{
HException.Value = ex.Message;
}
}
finally
{
TransferOrder = null;
}
}
#endregion Update Transfer Order Button Click




thanks
regards,
Arvind

Comments

  • freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    You write that you get an error in NAV (Other user has modified...) AND from web services - that kind of leads me to the assumption that your error must be in the C/AL code somewhere - I don't know the reason for going with a dynamic web services approach in this case - but the code shown here looks to be code that just moves data from object to object.

    IMO Dynamic Web Services should only be used in cases where you make generic Web Services access - as soon as you get into situations where your field names will be listed in text (like here) you should ask yourself whether this is the right choice.
    On the one hand - if you have a hard reference your reference will break and you will get an error and if you have dynamic web reference like here then something will just stop working and it is hard to find the problem (which even might have lead to other problems).

    You might of course have code elsewhere that checks whether the vital parts of the contract is OK and then give an error if not and use Dynamic Web Services because you know that 95% of customers customize this page - or stuff like that.

    Anyway - Dynamic web reference doesn't seem to be the cause of your problem though.

    (Sorry for the long answer)
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV
    http://blogs.msdn.com/freddyk

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • ssinglassingla Member Posts: 2,973
    marvind wrote:

    In navision i am facing the error
    Another user have modified the record for this transfer header after you received it form database.Enter your changes in the updated window, or start the interrupted activity again,Identification fields and values"

    This validates Freddy's point that the problem is with the NAV. Resolve the NAV error before testing it on .Net.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • marvindmarvind Member Posts: 25
    Thanks freddy
    i have cross check the page in navision and i found the error with the NAV page on modify(Tablelock). now it is working.

    thanks
    regards,
    Arvind
  • vicky_dadavicky_dada Member Posts: 106
    Hi Guys,

    this is one of the intresting forum. Can you guys throw some more light on dynamic web services? Is it normal we services or something else
  • siyyappan21siyyappan21 Member Posts: 2
    Me too having same problem. Please give me any solutions for this issues.

    The Error is : Other user has modifyed "Transfer _Order" "No=const(********)...

    While i am doing the continuous updates in Nav, I got this error.So Please advise me, How can i do that..?
  • Johannes_NielsenJohannes_Nielsen Member Posts: 206
    It's likely not "another user".

    It's your flow of code which leads to mutiple changes of the sames record "on top of each other".

    Rethink/rewrite your code.
    Best regards / Venlig hilsen
    Johannes Sebastian
    MB7-840,MB7-841
  • siyyappan21siyyappan21 Member Posts: 2
    Hi,

    Finally i got the solutions and fixed the error. How you know.. I want to read the data from the services multiple times after the every updates. That is the main reason for getting error. Initially i have done single time read the data and tried to update multiple times.

    So First i have read data and checking the status. And again i have read the data and do the updates now.

    Now its working fine.

    Thanks for helping to all.... :)
Sign In or Register to comment.