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",),"&",),")",),"(",),".",),"/",),"–",),"#",),"*",),"'",),"+",),":",),";",),"$",),"%",)= "")
Wednesday, February 19, 2025
Validate product from Retail Assortment in D365FO X++
Public boolean SAN_validateProductAssortment(Str _itemId)
{
RetailAssortmentTable retailAssortmentTable;
RetailChannelAssortedProductView retailChannelAssortedProductView;
InventTable inventTable;
while select retailAssortmentTable
{
select firstonly retailChannelAssortedProductView
exists join inventTable
where inventTable.ItemId == _itemId
&& retailChannelAssortedProductView.AssortmentRecId == retailAssortmentTable.RecId
&& retailChannelAssortedProductView.ProductID == inventTable.Product
&& retailChannelAssortedProductView.InventLocationDataAreaId == inventTable.DataAreaId;
if(retailChannelAssortedProductView)
{
return true;
}
}
}
throw Error("Invalid item to sell based on assortments");
}
Monday, January 6, 2025
Search hierarchy for a match (TableALLGroup) X++
Table1 ppt;
select firstonly ppt
order ItemCode, ItemRelation, AccountCode, AccountRelation where
(ppt.ItemCode == TableGroupAll::Table && ppt.ItemRelation == _itemId &&
ppt.AccountCode == TableGroupAll::Table && ppt.AccountRelation == _accountNum) ||
(ppt.ItemCode == TableGroupAll::Table && ppt.ItemRelation == _itemId &&
ppt.AccountCode == TableGroupAll::GroupId && ppt.AccountRelation == _accountGroup) ||
(ppt.ItemCode == TableGroupAll::Table && ppt.ItemRelation == _itemId &&
ppt.AccountCode == TableGroupAll::All && ppt.AccountRelation == '') ||
(ppt.ItemCode == TableGroupAll::GroupId && ppt.ItemRelation == _ItemGroup &&
ppt.AccountCode == TableGroupAll::Table && ppt.AccountRelation == _accountNum) ||
(ppt.ItemCode == TableGroupAll::GroupId && ppt.ItemRelation == _ItemGroup &&
ppt.AccountCode == TableGroupAll::GroupId && ppt.AccountRelation == _accountGroup) ||
(ppt.ItemCode == TableGroupAll::GroupId && ppt.ItemRelation == _ItemGroup &&
ppt.AccountCode == TableGroupAll::All && ppt.AccountRelation == '') ||
(ppt.ItemCode == TableGroupAll::All && ppt.ItemRelation == '' &&
ppt.AccountCode == TableGroupAll::Table && ppt.AccountRelation == _accountNum) ||
(ppt.ItemCode == TableGroupAll::All && ppt.ItemRelation == '' &&
ppt.AccountCode == TableGroupAll::GroupId && ppt.AccountRelation == _accountGroup) ||
(ppt.ItemCode == TableGroupAll::All && ppt.ItemRelation == '' &&
ppt.AccountCode == TableGroupAll::All && ppt.AccountRelation == '');
// Return table buffer if found, otherwise return 0 as the default
if (ppt.RecId)
{
// return result
}
Thursday, January 2, 2025
Create call center channel users X++ D365FO
RetailChannelTable channelTable;
MCRChannelUser channelUser;
while select channelTable
where channelTable.ChannelType == RetailChannelType::MCRCallCenter
{
channelUser.clear();
changecompany(channelTable.DefaultCustDataAreaId)
{
channelUser = MCRChannelUser::find();
if(!channelUser)
{
channelUser.clear();
channelUser.initValue();
channelUser.Channel = channelTable.RecId;
channelUser.User = curUserId();
channelUser.insert();
}
}
}
Upload file CSV/TXT using SysOperation in D365 X++
Upload CSV/TXT using SysOperation X++ Contract: /// <summary> /// Contract class upload through excel for PO inbound journals /// <...
-
Posting Vendor invoice based on Product receipt public void postPurchaseInvoiceJournal() { VendPackingSlipJour vendP...
-
Restore .bacpac file to Development VM Steps: 1. Take Backup of AxDB database from Development VM 2. Open Command Pr...
-
BP: BPUpgradeCodeLateBoundCall : BP Rule: [BPUpgradeCodeLateBoundCall]:A late bound call callingForm.refresh is made. In source system (...