web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

InventDimExistJoin macro is customized. How to handle it in extensions?

(0) ShareShare
ReportReport
Posted on by

Hi,

We have added a field in inventdim table. So we have modified the macros related to inventdim accordingly.  For example

InventdimExistsJoin Macro:

/* %1 InventDimId */
/* %2 InventDim */
/* %3 InventDimCriteria */
/* %4 InventDimParm */
/* %5 Index hint */

exists join tableId from %2
where (%2.InventDimId == %1) &&
(%2.ConfigId == %3.ConfigId || ! %4.ConfigIdFlag) &&
(%2.InventSizeId == %3.InventSizeId || ! %4.InventSizeIdFlag) &&
(%2.InventColorId == %3.InventColorId || ! %4.InventColorIdFlag) &&
(%2.InventStyleId == %3.InventStyleId || ! %4.InventStyleIdFlag) &&
(%2.InventSiteId == %3.InventSiteId || ! %4.InventSiteIdFlag) &&
(%2.InventLocationId == %3.InventLocationId || ! %4.InventLocationIdFlag) &&
(%2.InventBatchId == %3.InventBatchId || ! %4.InventBatchIdFlag) &&
(%2.WMSLocationId == %3.WMSLocationId || ! %4.WMSLocationIdFlag) &&
(%2.WMSPalletId == %3.WMSPalletId || ! %4.WMSPalletIdFlag) &&
// Added License Plate & Inventory Status
(%2.LicensePlateId == %3.LicensePlateId || ! %4.LicensePlateFlag) &&
(%2.InventStatusId == %3.InventStatusId || ! %4.InventStatusFlag) &&
(%2.InventSerialId == %3.InventSerialId || ! %4.InventSerialIdFlag) &&
//<GEERU>
(%2.InventGTDId_RU == %3.InventGTDId_RU || ! %4.InventGTDIdFlag_RU) &&
(%2.InventProfileId_RU == %3.InventProfileId_RU || ! %4.InventProfileIdFlag_RU) &&
(%2.InventOwnerId_RU == %3.InventOwnerId_RU || ! %4.InventOwnerIdFlag_RU)
//</GEERU>
//cs_sn
&& (%2.CsReqPlanningScopeId == %3.CsReqPlanningScopeId || ! %4.CsReqPlanningScopeIdFlag)
//cs_en
#InventDimDevelop

The highlighted line is the custom code. Now how to handle such macros during extensions? 

Thank you very much in advance.

Regards,

Giridhar

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    304,508 Super User 2026 Season 1 on at

    Hi Giridhar,

    You should prevent using macros anyway. Macros will slow down the compilation time of your solutions. Possible you can hook in another point and not call this macro, but create own logic.

  • Giridhar1617 Profile Picture
    on at

    Hi Andre,

    Thank you very much for the response. In my case as it is a new field in inventdimension and inventdimexistsjoin macro is used at several places to get the right inventdim we have modified it.  In this particular case if i need manually hook it i need to take care at so many places as inventdimexistsjoin is widely used in the system. Can you please suggest an alternate way?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans