D365 FinOps & Power Platform Unlocked is your go-to source for expert insights on Microsoft Dynamics 365 Finance & Operations and the Power Platform. Discover tutorials, tips, and best practices to leverage D365 F&O alongside Power BI, Power Apps, Power Automate, and more. Stay up-to-date with the latest innovations and solutions to optimize your enterprise systems and drive business success with ease
Wednesday, December 6, 2017
Wednesday, October 18, 2017
Get Unused Financial Dimensions in AX 2012
Here I wrote code for Department.
static void finacialDimValues(Args _args)
{
DimensionAttribute dimAttribute;
DimensionAttributeValue dimAttributeValue;
DimensionAttributeLevelValue dimAttributeLevelValue;
DimensionAttributeValueGroup dimAttributeValueGroup;
DimensionHierarchy dimHierarchy;
Dictionary dict = new Dictionary();
DictEnum dictEnum = new DictEnum(enumNum(OMOperatingUnitType));
TableId entityId;
RecId entityInstance;
DataAreaId dataAreaId;
RecId financialTagCategoryId;
TableId roleViewId;
OMOperatingUnit oMOperatingUnit;
DimensionAttributeValueSetItem dimAttributeValueSetItem;
while select oMOperatingUnit where oMOperatingUnit.OMOperatingUnitType == OMOperatingUnitType::OMDepartment
{
roleViewId = dict.tableName2Id(strFmt('DimAttribute%1', dictEnum.index2Symbol(oMOperatingUnit.OMOperatingUnitType)));
[entityId, entityInstance, dataAreaId, financialTagCategoryId] = DimensionEnabledType::getFieldsForDeleteOrRename(oMOperatingUnit, roleViewId);
// select firstOnly dimAttributeValueSetItem where dimAttributeValueSetItem.DisplayValue == oMOperatingUnit.OMOperatingUnitNumber;
select firstonly RecId from dimAttributeLevelValue
exists join dimAttributeValue where
dimAttributeValue.RecId == dimAttributeLevelValue.DimensionAttributeValue &&
dimAttributeValue.EntityInstance == entityInstance &&
dimAttributeValue.IsDeleted == false
exists join dimAttribute where
dimAttribute.RecId == dimAttributeValue.DimensionAttribute &&
dimAttribute.BackingEntityType == entityId
exists join dimAttributeValueGroup where
dimAttributeValueGroup.RecId == dimAttributeLevelValue.DimensionAttributeValueGroup
notExists join dimHierarchy where
dimHierarchy.RecId == dimAttributeValueGroup.DimensionHierarchy &&
dimHierarchy.StructureType == DimensionHierarchyType::Focus;
if(dimAttributeLevelValue)//dimAttributeValueSetItem)
{
continue;
}
else if(!OMMultipleHierarchy::checkExistenceInHierarchy(omOperatingUnit.RecId))
info(oMOperatingUnit.OMOperatingUnitNumber);
}
}
SQL query:
select * from DIMATTRIBUTEOMDEPARTMENT where not exists(
select * from DimensionAttributeLevelValue
join DimensionAttributeValue on
DimensionAttributeValue.RecId = DimensionAttributeLevelValue.DimensionAttributeValue and
DimensionAttributeValue.EntityInstance = DIMATTRIBUTEOMDEPARTMENT.RECID and
DimensionAttributeValue.IsDeleted = 0
join DimensionAttribute on
DimensionAttribute.RecId = DimensionAttributeValue.DimensionAttribute and
DimensionAttribute.BackingEntityType = 11765
join DimensionAttributeValueGroup on
DimensionAttributeValueGroup.RecId = DimensionAttributeLevelValue.DimensionAttributeValueGroup where
not exists(select * from DimensionHierarchy where
DimensionHierarchy.RecId = DimensionAttributeValueGroup.DIMENSIONHIERARCHY and
DimensionHierarchy.StructureType = 6))
@Rahul Talasila
Get unused Project categories In AX 2012
Note : Please create a table(Test) with two string fields.
Get Unused Main Accounts In AX 2012
Note : Please create a table (TestMainaccounts) with two string fields.
static void Ledgeraccounts(Args _args)
{
DimensionAttribute dimAttribute;
DimensionAttributeValue dimAttributeValue;
DimensionAttributeLevelValue dimAttributeLevelValue;
TestMainaccounts test;
Ledger Ledger;
LedgerChartOfAccounts ledgerChartOfAccounts;
FiscalCalendarPeriod fiscalCalendarPeriod;
//OGILedgerDimensionTable oGILedgerDimensionTable;
MainAccount mainAccount, mainAccountLoc; //Holds the main accounts
GeneralJournalEntry generalJournalEntry; //Used to hold Ledger transactions
GeneralJournalAccountEntry generalJournalAccountEntry; //Used to hold Ledger transactions
SubledgerJournalEntry subLedgerJournalEntry; //Used to hold sub Ledger transactions (Like sales/purch invoice etc.)
SubledgerJournalAccountEntry subLedgerJournalAccountEntry; //Used to hold sub Ledger transactions (Like sales/purch invoice etc.)
DimensionAttributeValueCombination dimAttrValueComb; //Used to store the combination of main accounts and dimensions
int i;
container conCompanies ;//= [ 'cm1', 'cm2', 'dat' ];
CompanyInfo companyInfo;
container concreteCompanies;
int concreteCompanyCount;
CompanyId currentConcreteCompany;
boolean canDelete;
SysDictTable tableToCheck;
TableId entityId;
RecId entityInstance;
DataAreaId dataAreaId;
RecId financialTagCategoryId;
Common _table;
TableId _roleViewId = 0;
// --VALIDATES NO LEDGER TRANSACTIONS HAVE BEEN POSTED.
delete_from test;
while select mainAccountLoc
{
_table = mainAccountLoc;
[entityId, entityInstance, dataAreaId, financialTagCategoryId] = DimensionEnabledType::getFieldsForDeleteOrRename(_table, _roleViewId);
select * FROM generalJournalAccountEntry
JOIN dimAttrValueComb where generalJournalAccountEntry.LedgerDimension == dimAttrValueComb.RecId
JOIN mainAccount where dimAttrValueComb.MainAccount == mainAccount.RecId
&& mainAccount.MainAccountId == mainAccountLoc.MainAccountId//"10604100"
JOIN ledgerChartOfAccounts where mainAccount.LedgerChartOfAccounts == ledgerChartOfAccounts.RecId
JOIN Ledger where Ledger.ChartOfAccounts == ledgerChartOfAccounts.RecId;
select firstonly RecId from dimAttributeLevelValue
exists join dimAttributeValue where
dimAttributeValue.RecId == dimAttributeLevelValue.DimensionAttributeValue &&
dimAttributeValue.EntityInstance == entityInstance &&
dimAttributeValue.IsDeleted == false
exists join dimAttribute where
dimAttribute.RecId == dimAttributeValue.DimensionAttribute &&
dimAttribute.BackingEntityType == entityId;
if(!generalJournalAccountEntry && !dimAttrValueComb && !dimAttributeLevelValue)// && !ledgerChartOfAccounts && !Ledger)
{
test.clear();
test.AccountNum = mainAccountLoc.MainAccountId;
test.Name = LedgerChartOfAccounts::find(mainAccountLoc.LedgerChartOfAccounts).Name;
test.insert();
i++;
}
}
info(strFmt("%1 total records", i));
}
SQL Query :
--------------
select * from MAINACCOUNT as a where not exists(
select * FROM generalJournalAccountEntry
JOIN DimensionAttributeValueCombination on generalJournalAccountEntry.LedgerDimension = DimensionAttributeValueCombination.RecId
JOIN MAINACCOUNT as b on DimensionAttributeValueCombination.MainAccount = b.RecId and
b.MAINACCOUNTID = a.MAINACCOUNTID
JOIN ledgerChartOfAccounts on b.LedgerChartOfAccounts = ledgerChartOfAccounts.RecId
JOIN Ledger on Ledger.ChartOfAccounts = ledgerChartOfAccounts.RecId) and
not exists( select * from DimensionAttributeLevelValue
join DimensionAttributeValue on
DimensionAttributeValue.RecId = DimensionAttributeLevelValue.DimensionAttributeValue and
DimensionAttributeValue.EntityInstance = a.RECID and
DimensionAttributeValue.IsDeleted = 0
join DimensionAttribute on
DimensionAttribute.RecId = DimensionAttributeValue.DimensionAttribute
and DimensionAttribute.BackingEntityType = 11762)
@Rahul Talasila
Wednesday, August 16, 2017
Display methods in D365 Finance Forms SSRS reports
1
2
3
4
5
6
7
8
9
| public static class MyCustTable_Extension { [SysClientCacheDataMethodAttribute( true )] //This attribute will cache your display method. public static display Name myDisplayName(CustTable _this) { return _this.nameAlias() + "myDisplayName" ; //Do here your display method as usual. } } |


f you are developing report based on query rather on based on RDP, you may want to make use of some display methods, but those may not work. “Not work” means no error in compilation or build, everything great but you may not see any results while you run the report. The returned data can be empty.
If so is the case, I would recommend to create a View and write display methods on the view. Now the display methods which are coming from View, will show you results properly.
For more details please see below URL's.
https://shyamkannadasan.blogspot.com/2017/07/display-methods-on-ssrs-report-d365o-ax.html
Tuesday, August 15, 2017
How to disable a form control in AX 365
/// Created by Rahul - 08/15/2017 for disabling LogisticsPostalAddress_Street control
/// </summary>
class LogisticsPostalAddress_EventHandler
{
/// <summary>
/// We are disabling LogisticsPostalAddress_Street control here
/// </summary>
/// <param name="args"></param>
[PostHandlerFor(formStr(LogisticsPostalAddress), formMethodStr(LogisticsPostalAddress, updateControls))]
public static void LogisticsPostalAddress_Post_updateControls(XppPrePostArgs args)
{
FormRun sender = Args.getThis();
sender.control(sender.controlId(formControlStr(LogisticsPostalAddress, LogisticsPostalAddress_Street ))).allowEdit (false);
}
}
Or second way
[FormControlEventHandler(formControlStr(SalesTable, ButtonLineInventory), FormControlEventType::Clicked)]
public static void ButtonLineInventory_OnClicked(FormControl sender, FormControlEventArgs e)
{
FormDataSource salesLine_ds = sender.formRun().dataSource("salesLine"); //DataSource form CustTable
FormRun element = sender.formRun(); //form element
FormControl buttonLineInventReservation = element.design(0).controlName("buttonLineInventReservation"); //New button on the form
buttonLineInventReservation.enabled(false);
}
Please refer below post also.
https://rahulmsdax.blogspot.com/2018/08/how-to-hide-form-control-in-ax-365.html
Friday, June 9, 2017
Friday, April 21, 2017
Tuesday, April 18, 2017
Recent versions of Dynamics 365 for Operations
Release | Version | Build number | Availability | Support end date | To learn more |
---|---|---|---|---|---|
Microsoft Dynamics 365 for Operations platform | Platform update 5 | 7.0.4475.16165 | March 2017 | March 31, 2018 | |
Microsoft Dynamics 365 for Operations platform | Platform update 4 | 7.0.4425.16161 | February 2017 | February 28, 2018 | |
Microsoft Dynamics 365 for Operations | 1611 | 7.1.1541.3036 | November 2016 | November 30, 2019 | What’s new or changed in Dynamics 365 for Operations version 1611 (November 2016) |
Microsoft Dynamics 365 for Operations platform | Platform update 3 | 7.0.4307.16141 | November 2016 | November 30, 2017 | What’s new or changed in Dynamics 365 for Operations platform update 3 (November 2016) |
Microsoft Dynamics AX platform | Platform update 2 | 7.0.4230.16130 | August 2016 | August 31, 2017 | What’s new or changed in Dynamics AX platform update 2 (August 2016) |
Microsoft Dynamics AX platform | Platform update 1 | 7.0.4127.16103 | May 2016 | May 31, 2017 | What’s new or changed in Dynamics AX platform update 1 (May 2016) |
Microsoft Dynamics AX application | 7.0.1 | 7.0.1265.23014 | May 2016 | June 30, 2017 | What’s new or changed in Dynamics AX application version 7.0.1 (May 2016) |
Microsoft Dynamics AX platform | 7.0 | 7.0.4030.16079 | February 2016 | January 31, 2017 | What’s new or changed in Dynamics AX 7.0 (February 2016) |
Microsoft Dynamics AX application | 7.0 | 7.0.1265.3015 | February 2016 | June 30, 2017 | What’s new or changed in Dynamics AX 7.0 (February 2016) |
Support matrix
Microsoft Dynamics AX 7.0 | Microsoft Dynamics AX application 7.0.1 | Microsoft Dynamics 365 for Operations (1611) | |
---|---|---|---|
Platform update 5 | Compatible | Compatible | Compatible |
Platform update 4 | Compatible | Compatible | Compatible |
Platform update 3 | Compatible | Compatible | Compatible |
Platform update 2 | Compatible | Compatible | |
Platform update 1 | Compatible | Compatible | |
Platform 7.0 | Compatible |
Update policy
- Dynamics 365 for Operations cloud platform updates will be initiated by Microsoft. After you provide your consent, platform updates will be rolled out to provide critical updates and features to the Dynamics 365 for Operations cloud platform.
- Dynamics 365 for Operations application updates will be initiated by you, the customer. After you provide your consent, application updates will be applied to your production environment.
- Microsoft will notify you about the critical update.
- Microsoft will notify you of the required downtime window (if any) and apply the critical update to your Dynamics 365 for Operations production environment.
Wednesday, April 5, 2017
Chnage Session date in Microsoft Dynamics AX 7/365
Session date
- Date selection on dashboard Calendar control.
- Date/time selection in the Session date and time form.
Calendar control
Session date and time form
There is more…
Why do users often get confused about Dynamics 365 Customer Engagement (D365 CE), Dataverse, and the Power Platform?
The Microsoft ecosystem for business applications can sometimes be difficult to navigate, especially when discussing Dynamics 365 Customer...
-
I have two solutions to post a packing slip through X++. Please change the cod accordingly. Solution - 1 - The best way to post packing ...
-
Below is the example I created for demonstrating how to call a menu item from X++. In this example I'm calling sales packing slip menu ...
-
Below is the job I created for posting sales invoices. Solution 1 ------------------ Public static void salesOrderInvoiceByLine(...