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
2022 Release Wave 2Check out the latest updates and new features of Dynamics 365 released from October 2022 through March 2023
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I'd like to change the Bin Code column on the Pick Instruction Report, to Shelf No. from Stockkeeping Units.
I believe I should be able to use Item No. & Location Code from the Sales Line to identify the correct Shelf No. from the Stockkeeping Unit Table.
Within the Pick Instructions Report (214) I added the Stockkeeping Units DataItem under the Sales Line DataItem, which resulted in the full list of Stockkeeping Unit records being added.
I want to filter Stockkeeping Unit DataItem so only the record with the specific Shelf No. is displayed where the Item No., and Location Code from both tables match.
Basically, I need to do a look-up of that shelf number.
I'm not sure how to accomplish that. Any insight would be much appreciated.
What you want is a value per sales line. I’d therefore delete the data item you inserted. Instead you want a section of code to calculate the value and return it to a column.
One way to do this. Add a new global variable like ShelfNo as a code (guessing - check the item table) and the item table. Go to the OnAfterGetRecord trigger of the Sales Line data item. Insert something like if salesline.type = salesline.type::item then begin
ShelfNo := Item.”Shelf No”;
Thanks for your response.
You were right about the Code.
I've followed you up to "...insert something like salesline.type = ..." but I think I have some slightly different requirements. Trying to work out what to do there.
I did the following....
I am getting this error when running the report. (no errors on the code in Dev Environment).
I suspect this is related to either:
Given that I am trying to obtain the 'Shelf No.' column in the 'Stockkeeping Units' table, where the 'Location Code' and 'Item No.' match the 'Sales Line' columns 'No.' and 'Location Code'. Are there changes you'd make to that code?
Sorry I neglected that part. The .GET needs the primary key values of the table. In your case salesline.”Location Code”,salesline.”No.”, salesline.”Variant Code” should be sufficient
Thank you very much for your solution, it worked great.
Here is what my code ended up being...
Sales Line - OnAfterGetRecord()
IF Type = Type::Item THEN BEGIN
Item.GET("Sales Line"."Location Code","Sales Line"."No.", "Sales Line"."Variant Code");
ShelfNo := Item."Shelf No.";
Business Applications communities