Hallo everyone,
i would like to make some fields in a table ForecastSales editable depending on other fields in this table.
allowEdit = ForecastSales.FOMBudgetLineArchivedCommitted == 0 || ForecastSales.FOMBudgetLineArchivedConsumed == 0;
allowEdit = allowEdit && !ForecastSales.RecId && ( ProjTable::find( ForecastSales.ProjId ).FOMProjForecastMode == FOMProjForecastMode::Manual && selectionModelTypeFilter != enum2str(FOMForecastModelType::Budget) );
ForecastSales_ds.object( fieldnum( ForecastSales, StartDate )).allowEdit( allowEdit );
But I am having trouble with the condition for the “allowEdit”-Variable.
My conditions for the editing the fields are:
-
the field Committed Budget is 0 OR the field ConsumedBudget is 0.
-
the ModelType of the Plan is “Budget” - that part should be right.
As a result of this code non of the fields in the table are editable [:S]
Can anybody help me with that please?