Good morning all!
We have the requirement to automatically process/push masterplanning delay days to our sales orders.
To accomplish this I have made a class that checks the ReqTrans table, takes the futuredate (that is the date that the Masterplanning calculates as the first possible delivery date) and updates the salesline confirmed shipdate.
This goes well, however... it doesn't automatically update the confirmed receipt date. Only the confirmed ship date is updated.
Because of calendars (customer calendars, warehouse calandars etc.) and transport days, it is not as simple as using the same date as the confirmed ship date. Therefore I call the 'normal' modified field logic:
try
{
ttsbegin;
updateSalesline.ShippingDateConfirmed = salesLineToDate;
updateSalesline.modifiedFieldDDC(fieldNum(SalesLine, ShippingDateConfirmed), false);
updatesalesline.update();
ttscommit;
delaysPushed ;
}
I give the parameter 'false' to the modifiedfieldDCC, to let the method know that it is not ok to give the user UI-interaction. However, when I run the code and a calendar issue occurs, it pops up the User interface after all:

When I try to update I get a unbalance in TTS because I am in an update action and try to do another one.
What am I missing here? I am giving the 'False' variable to the modifiedfield method, however it seems that it is being ignored. I see in the table method that the boolean is always set to true:
///
/// Processes the modified field event for delivery date control fields.
///
///
/// The field ID for the modified field.
///
///
/// Controls whether UI interactions with the user are allowed.
///
public void modifiedFieldDDC(FieldId _fieldId, boolean _uiEnabled = true) //Enhanced Delivery Date Control
{
Does anyone know how to approach this?
Thank you very much for your help.
Willem.