Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 17314

Required check and update when deleting a backing entity for a financial dimension

$
0
0
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:
// Check to see if the associated dimension attribute value has been used
// in a way that would prevent deletion.
if (!DimensionValidation::canDeleteEntityValue(this))
{
throw error(strFmt("@SYS134392", this.PersonnelNumber));
}
And the update takes place within TTS:
// 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

Viewing all articles
Browse latest Browse all 17314

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>