Tuesday, October 14, 2025
Update Blob storage file data key value using ADF pipeline
Wednesday, September 10, 2025
Update ISV license on CHD D365FO
Open command prompt:
//Enable maintenance mode
cd K:\AosService\PackagesLocalDirectory\Bin\
Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir K:\AosService\PackagesLocalDirectory --bindir K:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd "password from LCS" --setupmode maintenancemode --isinmaintenancemode true
//Restart IIS
iisreset
//Import new license file comman
Microsoft.Dynamics.AX.Deployment.Setup.exe --setupmode importlicensefile --metadatadir K:\AOSService\PackagesLocalDirectory --bindir K:\AOSService\PackagesLocalDirectory --sqlserver . --sqldatabase AxDB --sqluser axdbadmin --sqlpwd "password from LCS" --licensefilename C:\Temp\<"license file name">.txt
//Disbale maintenance mode
Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir K:\AosService\PackagesLocalDirectory --bindir K:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd "password from LCS" --setupmode maintenancemode --isinmaintenancemode false
//Restart IIS
iisreset
Build ISV model and custom model (If any).
DB Sync
Friday, August 8, 2025
Tuesday, July 1, 2025
Set visibility of menu item based on Feature or parameter options in D365FO
[SubscribesTo(classstr(SysMenuNavigationObjectFactory), staticdelegatestr(SysMenuNavigationObjectFactory, checkAddSubMenuDelegate))]
public static void menuItemVisibilityHandler(SysDictMenu _rootMenu, SysDictMenu _subMenu, SysBoxedBoolean _subMenuVisibility)
{
if (_subMenu.isMenuItem())
{
var metadataElement = _subMenu.GetMenuItemMetaElement();
if (metadataElement != null)
{
SAN_HelperCls::santst_setVisibilityMenuItems(metadataElement.Name, _subMenuVisibility);
}
}
}
public class SAN_HelperCls
{
private static void santst_setVisibilityMenuItems(str _menuItemName, SysBoxedBoolean _subMenuVisibility)
{
const str menuItemsPrefix = "SAN_TEST";
if (strScan(_menuItemName, menuItemsPrefix , 0, strLen(_menuItemName)))
{
_subMenuVisibility.value = SAN_HelperCls::isEnabled();
}
}
public static boolean isEnabled()
{
return isConfigurationkeyEnabled(configurationkeynum(Trade)) &&
FeatureStateProvider::isFeatureEnabled(SAN_DevFeature::instance());
}
}
Parameter control (Yes/No)
or
Feature class:
using System.ComponentModel.Composition;
using Microsoft.Dynamics.ApplicationPlatform.FeatureExposure;
/// <summary>
/// The <c>SAN_DevFeature</c> class defines the enable advanced order hold feature.
/// </summary>
[ExportAttribute(identifierstr(Microsoft.Dynamics.ApplicationPlatform.FeatureExposure.IFeatureMetadata))]
[Microsoft.Dynamics.BusinessPlatform.SharedTypes.InternalUseOnlyAttribute]
public final class SAN_DevFeature implements IFeatureMetadata, IFeatureLifecycle
{
private static SAN_DevFeature instance;
private void new()
{
}
[Hookable(false)]
public WebSiteURL learnMoreUrl()
{
return 'https://learn.microsoft.com/en-us/';
}
private static void TypeNew()
{
instance = new SAN_DevFeature();
}
/// <summary>
/// Obtains the singleton object instance.
/// </summary>
/// <returns>The <c>SAN_DevFeature</c> instance.</returns>
[Hookable(false)]
public static SAN_DevFeature instance()
{
return SAN_DevFeature::instance;
}
[Hookable(false)]
public FeatureLabelId label()
{
return literalStr("SAN DEV tool features");
}
[Hookable(false)]
public int module()
{
return FeatureModuleV0::SalesAndMarketing;
}
[Hookable(false)]
public FeatureLabelId summary()
{
return literalStr("SAN DEV tool features");
}
[Hookable(false)]
public boolean isEnabledByDefault()
{
return false;
}
[Hookable(false)]
public boolean canDisable()
{
return true;
}
[Hookable(false)]
public FeatureLifecycleStage FeatureStage()
{
return FeatureLifecycleStage::Released;
}
}
Tuesday, June 24, 2025
Getting multiple row data into single SQL column
Table data:
Id | Text | Description
1 | Test1 | Test description
1 | Test2 | Test description
1 | Test3 | Test description
2 | Test2 | Test description
3 | Test3 | Test description
Expected result: System should return "Test1;Test2;Test3" for data related to Id = '1'
Query (T-SQL)
Sample 1:
SELECT t.LegalEntity, t.ITEMNUMBER,
replace(STUFF((SELECT '; ' + CAST(t1.Text AS VARCHAR(255)) [text()]
FROM TESTTABLE t1
WHERE t1.ID = t.ITEMNUMBER and t1.LEGALENTITY = t.LEGALENTITY
FOR XML PATH(''), TYPE)
.value('.','NVARCHAR(255)'),1,2,''),' ','') AS ComputeDescription
FROM InventTable t
where t.ITEMNUMBER in ('1') and t.LEGALENTITY = 'usmf'
group by t.LegalEntity, t.ITEMNUMBER
Sample 2:
SELECT it.ITEMLE, it.ITEMNUMBER,
CAST (ISNULL((SELECT STRING_AGG(t1.Text,';') AS ProductLine
FROM TESTTABLE t1
where t1.ID = it.ITEMNUMBER and t1.LEGALENTITY = it.DataAreaId),'') as NVARCHAR(255)) AS ComputeDescription
from InventTable it
where it.DataAreaId = 'chhq'
and it.ITEMNUMBER in ('0000505','0000511','0000497','0000499')
Monday, June 2, 2025
To Get line total charge amount & Tax Amount posted for Sales invoice lines D365FO X++
For reporting or inquiry purpose to review consolidated charges per Invoice line.
Using these two below view we can get Charge amount posted (Prorate or fixed or percent or pcs or any category) and along with Tax amount posted on it.
MarkupTransLineTotalChargeTaxAmountView - Tax Amount
MarkupTransLineTotalChargeAmountView - Charge amount
Wednesday, May 14, 2025
Upload file CSV/TXT using SysOperation in D365 X++
Tuesday, April 15, 2025
OData Batch request API - D365FO
--batch_MultipleInvoices
Content-Type: multipart/mixed;boundary=changeset_123
--changeset_123
Content-Type: application/http
Content-Transfer-Encoding: binary
POST https://<d365fourl>/data/PortalSalesDocuments/Microsoft.Dynamics.DataEntities.getSalesInvoice HTTP/1.1
Content-Type: application/json
Content-ID: 1
{
"invoiceId": "SIAA00026",
"dataAreaId": "usmf"
}
--changeset_123
Content-Type: application/http
Content-Transfer-Encoding: binary
POST https://<d365fourl>/data/PortalSalesDocuments/Microsoft.Dynamics.DataEntities.getSalesInvoice HTTP/1.1
Content-Type: application/json
Content-ID: 2
{
"invoiceId": "SIAA00047",
"dataAreaId": "usmf"
}
--changeset_123--
--batch_MultipleInvoices--
Friday, March 21, 2025
Disabling the flight in D365FO (CHD - Tier 1)
INSERT INTO dbo.SYSFLIGHTING(FLIGHTNAME, ENABLED)
VALUES ('<FlightObjectName>_KillSwitch', 1)
or
INSERT INTO dbo.SYSFLIGHTING(FLIGHTNAME, ENABLED)
VALUES ('<FlightObjectName>', 0)
Monday, March 17, 2025
Get unicode character in excel
Excel formula
=AND(ISTEXT(C2),SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LOWER(C2),"a",),"b",),"c",),"d",),"e",),"f",),"g",),"h",),"i",),"j",),"k",),"l",),"m",),"n",),"o",),"p",),"q",),"r",),"s",),"t",),"u",),"v",),"w",),"x",),"y",),"z",),"-",),",",),"",),"0",),"1",),"2",),"3",),"4",) ,"5",),"6",),"7",),"8",),"9",),"&",),")",),"(",),".",),"/",),"–",),"#",),"*",),"'",),"+",),":",),";",),"$",),"%",)= "")
Skip Inventory reservation on Sales order lines in D365FO
[ExtensionOf(classStr(InventUpd_Reservation))] final class InventUpd_ReservationCls_SAN_Extension { void updateNow() { if(mo...
-
Posting Vendor invoice based on Product receipt public void postPurchaseInvoiceJournal() { VendPackingSlipJour vendP...
-
protected void executePostingDataPerOrder(str _salesId) { SalesFormLetter_PackingSlip salesFormLetter_PackingSlip...
-
Class SAN_PickingQtyOrder { public static void DoPickQtyForOrderLine(SalesLine _SalesLine, Qty _qtyPicked) { Inve...