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
2023 Release Wave 1Check out the latest updates and new features of Dynamics 365 released from April 2023 through September 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 | All TechTalks
I'm defining a page test to create new vendor bank account as below:1. Go to Vendor List and find a particular vendor2. Open bank account list page for that vendor3. Click new and create vendorI have written the code as below:VendorList.OPENEDIT;VendorBankAccountList.TRAP;VendorList."Page Vendor Bank Account List".INVOKE;VendorBankAccountCard.TRAP;VendorBankAccountList.NEW;VendorBankAccountCard.Code.SETVALUE('aa');VendorBankAccountCard.CLOSE;VendorBankAccountList.CLOSE;VendorList.CLOSE;When I execute, i'm getting below result as failed:
Can someone suggest me, how I can improve my Code?
I ran your code and got the same error as you. The debugger shows that the error is on this line:
So, if I add the following line of code just above, then at least it runs:
VendorBankAccountCard.OPENEDIT; /// New lineVendorBankAccountCard.Code.SETVALUE('aa');
Thanks for the suggestions:
My intention is to create bank account for a particular vendor. I modified the code as below:
VendorList."Page Vendor Bank Account List".INVOKE;
But, when I run the code, vendor bank created with blank vendor number.
I guess that when the VendorBankAccountCard opens, for some reason it is not filtering on "Vendor No.". I don't know if you can set this filter before SETVALUE? And I think I should know, but how do you see the Vendor Bank Account created with a blank "Vendor No."? I though modifications in a test codeunit do not get committed?
OK, I see what you mean. I have not found any ways to run the "New" action, then get the card-page opened filtered. I see that this and other documentation around testing, does a plain Rec.INSERT, so not always inserting via test pages:
so that's the only workaround that I can think of, but of course that may change the value of the test. Also if others in this forum have ideas I hope thay can contribute here, or if this is indeed some missing functionality then you can log it on http://aka.ms/BCIdeas . Sorry that's all I can think of, I hope that if others have better ideas that they will add them here,
Business Applications communities