Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Dynamics 365 for Finance and Operations Development Cookbook - Fourth Edition

You're reading from  Dynamics 365 for Finance and Operations Development Cookbook - Fourth Edition

Product type Book
Published in Aug 2017
Publisher Packt
ISBN-13 9781786468864
Pages 480 pages
Edition 4th Edition
Languages
Authors (2):
Abhimanyu Singh Abhimanyu Singh
Profile icon Abhimanyu Singh
Deepak Agarwal Deepak Agarwal
Profile icon Deepak Agarwal
View More author details

Table of Contents (18) Chapters

Title Page
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface
1. Processing Data 2. Working with Forms 3. Working with Data in Forms 4. Building Lookups 5. Processing Business Tasks 6. Data Management 7. Integration with Microsoft Office 8. Integration with Power BI 9. Integration with Services 10. Improving Development Efficiency and Performance

Creating a purchase order


Purchase orders are used throughout the purchasing process to hold information about the goods or services that a company buys from its suppliers. Normally, purchase orders are created from the user interface, but in automated processes, purchase orders can be also created from the code.

In this recipe, you will learn how to create a purchase order from the code. We will use a standard method provided by the application.

How to do it...

Carry out the following steps in order to complete this recipe:

  1. Add a new runnable class named CreatePurchOrder with the following code snippet:
        static void PktCreatePurchOrder(Args _args) 
       {   
          NumberSeq  numberSeq; 
          PurchTable purchTable; 
          PurchLine  purchLine; 
 
          ttsBegin; 
          //initialize number sequence objects 
          numberSeq = NumberSeq::newGetNum( 
           PurchParameters::numRefPurchId()); 
            numberSeq.used(); 
          purchTable.PurchId = numberSeq...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}