When you delete a record that is also a backing entity for a financial dimension, you need to check that the financial dimension framework allows you to delete the backing entity and you need to update the financial dimension as being deleted.
This is done in the delete method of the backing entity.
The check takes place outside TTS:
Examples of this can be found several places in standard AX, for example on the tables:
This is done in the delete method of the backing entity.
The check takes place outside TTS:
// Check to see if the associated dimension attribute value has been usedAnd the update takes place within TTS:
// in a way that would prevent deletion.
if (!DimensionValidation::canDeleteEntityValue(this))
{
throw error(strFmt("@SYS134392", this.PersonnelNumber));
}
// Update the associated dimension attribute value.
DimensionAttributeValue::updateForEntityValueDelete(this);
Examples of this can be found several places in standard AX, for example on the tables:
- ProjTable
- HcmWorker