I can, it follows the msdn example closely but not exact.
I have redesigned the class and now close the connection after updates and it works correctly now. So i feel this is a bug in the business connector. maybe we dont have the latest service pack / updates,
public bool UpdateStatus(Axapta axconn)
{
if (_IsDirty)
{
if (axconn.Session().ToString().Length > 0)
{
using (AxaptaRecord UpdateJobStatus = axconn.CreateAxaptaRecord(“CreditAutomationJobStatus”))
{
axconn.TTSBegin();
UpdateJobStatus.ExecuteStmt(string.Format(“select forupdate * from %1 where %1.ServiceID == ‘{0}’”, _ServiceID));
UpdateJobStatus.set_Field(“ServiceID”, _ServiceID);
UpdateJobStatus.set_Field(“LastCheckin”, DateTime.Now.ToString());
UpdateJobStatus.set_Field(“ServiceStatus”, _Status);
UpdateJobStatus.set_Field(“RunTime”, _lastRuntime.ToString());
UpdateJobStatus.set_Field(“LastRun”, _EndTime.ToString());
if (UpdateJobStatus.Found)
{
UpdateJobStatus.Update();
}
else
{
UpdateJobStatus.Insert();
}
axconn.TTSCommit();
UpdateJobStatus.Dispose();
_IsDirty = false;
return true;
}
}
}
return true;
}
Morning, You mean the ttsbegin? I originally had it at the top and at the close, still the same problem. With the same code working with only changing the section that opens and closes the connection, Leads me to believe our system may not be fully patched on our development system., Do you know what version and patch level your system is at? Thanks Chris