Notifications
Announcements
No record found.
HI,
I need to check if the batch number is active for an item or not before creating batch for that item by code.
*This post is locked for comments
static void validateTracDim_SMC(Args _args) { ItemId varItemId = 'TestItemNameBySohaib'; FieldId observedDimension = fieldNum(InventDim, InventBatchId); str label = fieldPName(InventDim, InventBatchId); NoYes isActive; ; isActive = ecoResTrackingDimensionGroupFldSetup::findByDimensionGroupFieldId(InventTable::find(varItemId).trackingDimensionGroup(), observedDimension).IsActive; if(isActive) info(strFmt('%1 is active for %2',label,varItemId)); else info(strFmt('%1 is not active for %2',label,varItemId)); }
Thanks Sohaib
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2