26.07.2024, 18:12 | #1 |
Участник
|
dynamicsaxinsight: D365: Get dimension value owner name in X++
Источник: https://dynamicsaxinsight.com/2024/0...r-name-in-xpp/
============== Purpose: Demonstrate how can we get the dimension value owner name in X++. Application: Dynamics 365 for Finance and Operations Business requirement: Business requirement is to display cost center owner name in a report. Solution: We can use the code below to get the cost center dimension value owner in X++. Code /// /// Get dimension value owner Feb 16, 24 MK/// /// /// Atlas Dynamics Pty Ltd./// public RefRecId getDimensionAttributeValueOwner(Name _dimAttrName, DimensionDisplayValue _dimAttrValue){ DimensionAttribute dimAttribute; DimensionAttributeValue dimAttributeValue; dimAttribute = DimensionAttribute::findByName(_dimAttrName); dimAttributeValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttribute, _dimAttrValue); return dimAttributeValue.Owner;} We can then call this method in the following way to initialize the temp table buffer. hcmWorker = HcmWorker::find(this.getDimensionAttributeValueOwner(#CostCenter, purchOrderLineTmp.DimensionCostCenter));purchOrderLineTmp.DimOwner = hcmWorker.PersonnelNumber;purchOrderLineTmp.DimOwnerName = hcmWorker.name(); Источник: https://dynamicsaxinsight.com/2024/0...r-name-in-xpp/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|