Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
we are trying to accomplish an automation where when the lifecycle stage of an item is in a specific stage and we have 0 qty on hand, o qty on order and the tier revision date is at least 2 weeks greater than our workdate we want to set the lifecycle stage to obsolete, check a box on our item card edi obsolete true, uncheck a box on our item card include on website and delete our item cross references for those items affected after 14 days.
additionally we have a need to uncheck default bins, fixed bins, and empty bins in the bin contents
our MS partner applied this object as a report to run however this is not doing anything after setting items to:
0 on hand in all locations
0 on purchase order
Compare date = at least 14 days from today’s date (07.30.19)
Tier revision date is set (07.30.19)
EDI obsolete is false
Include on website is true
I have tried setting my work date in nav to be in the future approximately 09.26.19 and running the item automation cleanup but I yield the same result.
Item - OnPreDataItem() Item.CALCFIELDS(Inventory, "Qty. on Purch. Order","Qty. on Sales Order");CompareDate := WORKDATE-14;
Item - OnAfterGetRecord()Item."Lifecycle Stage" := 'OBSOLETE - DISC.';Item."EDI Obsolete" := TRUE;Item."Include on Website" := FALSE;Item.MODIFY;IF (Item."Tier Revision Date" < (CompareDate))AND (Item."Tier Revision Date" > 0D) AND (Item.Inventory = 0)AND (Item."Qty. on Purch. Order"=0) THEN BEGIN ItemCrossReference.RESET; ItemCrossReference.SETRANGE("Item No.", Item."No."); IF ItemCrossReference.FINDSET THEN ItemCrossReference.DELETEALL(TRUE);END;
Item - OnPostDataItem()BinContent.RESET;BinContent.SETRANGE(Default, TRUE);IF BinContent.FINDSET THEN BinContent.MODIFYALL(Default, FALSE);
BinContent.RESET;BinContent.SETRANGE(Fixed, TRUE);IF BinContent.FINDSET THEN BinContent.MODIFYALL(Fixed, FALSE);
BinContent.CALCFIELDS(Quantity);BinContent.SETRANGE(Quantity, 0);IF BinContent.FINDSET THEN BinContent.DELETEALL(TRUE);
can anyone confirm that this is the correct way to approach this? what would need to change?
I don't see any code where it check the qty on hand.
This code should not be written (Item.CALCFIELDS(Inventory, "Qty. on Purch. Order","Qty. on Sales Order");, there is an property on report calcfield, there you can select the required calcfields, cause you are using item master as your dataitem.
Also which bin content is getting deleted, cause I don't see any code written to set the item,location and then find the bin content.
Business Applications communities