Hello DAX Buddy,
Here is a code to Update Product Attribute for an item in D365FO using X++ programming
Hello DAX Buddy,
Here is a code to Update Product Attribute for an item in D365FO using X++ programming
Workflow has become necessities in an organization where any action of one user is needed to be approved by his senior or responsible role member. For eg – Creating new Fixed assets or posting invoices may need approval before posting.
Trying to set up a workflow in D365 Finance & operations AX for any module, You first need to do some setup to enable it. A complete detailed steps guide is provided below. If you like the article, don’t forget to share the article
Time needed: 5 minutes.
Setup workflow
Click on number sequence on New tab for generating new number sequence
Define number sequence code ,name in shared scope and add ######### (9#) in alphanumeric segment as shown below
Under Workflow area, add Instance Id reference as shown below
After adding 2nd reference, you’ll have set up like below screenshot
Select an existing user to be used for batch workflow execution and define minutes for workflow batch job execution.
Refer below screenshot
Go to System administration ->Inquiries -> Batch jobs
and filter in the job description for workflow. You’ll have 3 batch jobs enabled for a workflow like below screenshot
After following the above 6 easy to understand steps, you can now easily setup any ERP module workflow without any problem. I hope this article helped you learn how you can setup a workflow in D365 Finance & operations AX. Don’t forget to share this article.
Hello Guys,
Here is the post to convert the Default dimension to the ledger dimension.
protected DimensionDynamicAccount getLedgerDimension(mainAccountNum _mainAccountId, RefRecId _defaultDimension)
{
mainAccountNum mainAccountId = _mainAccountId;
MainAccount mainAccount;
DimensionAttribute dimensionAttribute;
DimensionAttributeValue dimensionAttributeValue;
DimensionSetSegmentName dimensionSet;
DimensionStorage dimensionStorage;
LedgerAccountContract ledgerAccountContract = new LedgerAccountContract();
DimensionAttributeValueContract valueContract;
DimensionAttributeValueSetStorage dimStorage;
List valueContracts = new List(Types::Class);
Counter i;
int hierarchyCount;
int hierarchyIdx;
RefRecId recordvalue;
mainAccount = MainAccount::findByMainAccountId(mainAccountId);
recordvalue = DimensionHierarchy::getAccountStructure(mainAccount.RecId,Ledger::current());
hierarchyCount = DimensionHierarchy::getLevelCount(recordvalue);
DimensionSet = DimensionHierarchyLevel::getDimensionHierarchyLevelNames(recordvalue);
for(hierarchyIdx = 1;hierarchyIdx<=hierarchyCount;hierarchyIdx++)
{
if(hierarchyIdx == 1)
{
continue;
}
// _defaultDimension is a RecId that combines all Dimension Values
dimStorage = DimensionAttributeValueSetStorage::find(_defaultDimension);
for (i= 1 ; i<= dimStorage.elements() ; i++)
{
if(DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name == DimensionSet[hierarchyIdx])
{
dimensionAttribute = DimensionAttribute::findByLocalizedName(DimensionSet[hierarchyIdx],false, CompanyInfo::find().LanguageId);
if(dimensionAttribute)
{
dimensionAttributeValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimensionAttribute,dimStorage.getDisplayValueByIndex(i));
if(dimensionAttributeValue)
{
ValueContract = new DimensionAttributeValueContract();
ValueContract.parmName(dimensionAttribute.Name) ;
ValueContract.parmValue(dimensionAttributeValue.CachedDisplayValue);
valueContracts.addEnd(ValueContract);
}
}
continue;
}
}
}
LedgerAccountContract.parmMainAccount(mainAccountId);
LedgerAccountContract.parmValues(valueContracts);
dimensionStorage = DimensionServiceProvider::buildDimensionStorageForLedgerAccount(LedgerAccountContract);
return DimensionAttributeValueCombination::find(dimensionStorage.save()).RecId;
}