void enableFieldsActive()
{
prodJournalRoute_ds.object(fieldnum(ProdJournalRoute,EmplId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRoute_ds.object(fieldnum(ProdJournalRoute,CategoryHoursId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRoute_ds.object(fieldnum(ProdJournalRoute,CategoryQtyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
projectHour.visible(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjHour_ds.object(fieldnum(ProdJournalRouteProj,ProjId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjHour_ds.object(fieldnum(ProdJournalRouteProj,ProjLinePropertyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjHour_ds.object(fieldnum(ProdJournalRouteProj,ProjSalesCurrencyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
projectQuantity.visible(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjQuantity_ds.object(fieldnum(ProdJournalRouteProj,ProjId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjQuantity_ds.object(fieldnum(ProdJournalRouteProj,ProjLinePropertyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjQuantity_ds.object(fieldnum(ProdJournalRouteProj,ProjSalesCurrencyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
}
void enableFieldsActive()
{
// Add the following lines.
int i;
container enabledDimFields = InventDim::dimEnabledFieldList();
container dimFields = InventDim::dimFieldList();
;
prodJournalRoute_ds.object(fieldnum(ProdJournalRoute,EmplId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRoute_ds.object(fieldnum(ProdJournalRoute,CategoryHoursId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRoute_ds.object(fieldnum(ProdJournalRoute,CategoryQtyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
projectHour.visible(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjHour_ds.object(fieldnum(ProdJournalRouteProj,ProjId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjHour_ds.object(fieldnum(ProdJournalRouteProj,ProjLinePropertyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjHour_ds.object(fieldnum(ProdJournalRouteProj,ProjSalesCurrencyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
projectQuantity.visible(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjQuantity_ds.object(fieldnum(ProdJournalRouteProj,ProjId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjQuantity_ds.object(fieldnum(ProdJournalRouteProj,ProjLinePropertyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
prodJournalRouteProjQuantity_ds.object(fieldnum(ProdJournalRouteProj,ProjSalesCurrencyId)).mandatory(prodJournalRoute.isProjMethodConsumed());
// Add the following lines.
for(i = 0; i < conlen(dimFields) ; i++)
{
if (inventDim_DS.object(conpeek(dimFields, i)))
{
if (prodJournalRoute.ProdInventDimId == InventDim::inventDimIdBlank())
{
inventDim_DS.object(conpeek(dimFields,i)).enabled(false);
}
else
{
inventDim_DS.object(conpeek(dimFields,i)).enabled(confind(enabledDimeFields,i) != 0);
}
}
}
}