public static void main(Args _args)
{
inventParameters inventParameters;
select inventParameters;
RefRecId defaultDimension;
defaultDimension = InventSite::find('21').DefaultDimension;
// Deriving default dimensions linked to inventory site
DimensionDefault derivedDimension = LedgerDimensionFacade::serviceApplyDerivedDimensionsForAttribute(defaultDimension,
inventParameters.SiteDimensionAttribute, Ledger::current());
// Merging derived default dimension linked to inventory site with original default dimension
boolean precedenceEnabled = DimensionAttributeDerivedDimensions::derivedDimensionPrecedenceEnabled();
if (precedenceEnabled && DimensionAttributeDerivedDimensions::dimensionAttributeHasDerivedDimensionPrecedence(inventParameters.SiteDimensionAttribute))
{
defaultDimension = LedgerDimensionDefaultFacade::serviceMergeDefaultDimensions(derivedDimension, defaultDimension);
}
else
{
defaultDimension = LedgerDimensionDefaultFacade::serviceMergeDefaultDimensions(defaultDimension, derivedDimension);
}
DimensionSetEntity dimensionSetEntity;
select * from dimensionSetEntity
where dimensionSetEntity.RecordId == defaultDimension;
No comments:
Post a Comment