Hi !
We have an Update trigger to catch up records of few fields from Sales line table to another table being with another DB.
But that leads to error in Navision postings, like the below,
Another user has modified the record for this Sales line after you retreived it from the database. Enter your changes again in the updated window, or start the interrupted activity again
.
How to overcome this error??
Thanks !
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Hi ! Thanks for ur reply,
But i am not writing into sales line, Jus picking up the values from the line at the time of the line getting updated and storing those to a another table.
The error occurs only when the header getting changed and affects the lines and not when the row gets changed individually.
Like, when the the Delivery date on header gets changed , it asks for update over rows, by this time alone the error occurs.
Where as when the row delivery date is changed manually row by row the error is not appearing.
Any guess??
Probably this is happening:
Solutions:
Or you put the VAR-toggle in Function2 if that is possible
Or after calling Function2, you refresh the record, doing a GET or a FIND('=')
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
But i do have the Triggers in SQL in Sales Line Table...
I am not aware of NAV C/AL codes... Seems u ve mentioned it for C/AL code ...
is there a similar way to do it in SQL ?
The Trigger looks like,
Update Trigger looks like,
Thanks !!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Are you sure?
This worked for me in version 4 SQL 2000, so give it a try.
The regular read in the update trigger apparently updates the timestamp field in the table which is why you get the message.
http://mibuso.com/blogs/davidmachanick/
did you find any solution to your problem? How should I use sql cursor to make this work ?
This also happening on me last time we use trigger to update another record from sales line,
because like kriki said those running trigger have different version of modify record which can
cause locking on timestamp which is always updated when Sales Line record updated or modify
from NAV Service. i suggest that you use Predefined Event on Table Sales Line without touching
SQL Server side.