Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Dynamics 365 Business Central Cookbook

You're reading from   Microsoft Dynamics 365 Business Central Cookbook Effective recipes for developing and deploying applications with Dynamics 365 Business Central

Arrow left icon
Product type Paperback
Published in Aug 2019
Publisher Packt
ISBN-13 9781789958546
Length 380 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Michael Glue Michael Glue
Author Profile Icon Michael Glue
Michael Glue
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Let's Get the Basics out of the Way FREE CHAPTER 2. Customizing What's Already There 3. Let's Go Beyond 4. Testing and Debugging - You Just Gotta Do It 5. Old School, Meet New School 6. Making Your App Extensible 7. Business Central for All 8. DevOps - Don't Live without It 9. Time to Share Your Application! 10. Other Books You May Enjoy

The Variant Façade design pattern

Have you ever written a function to do something to an open table, and then you had to do the same function for the posted one? Or, maybe you've created a routine to process customer records, and then you've also needed the same function for vendors?

What did you do?

I bet more often than not, you took a copy of that original function and updated/renamed the variables to point to the second table. Now, you're left with two copies of the same function to maintain, and two entry points to the same functionality.

The Variant Façade pattern enables you to define a single entry point for your function, allowing it to accept any table record.

This recipe will show you how to use the Variant Façade pattern in your AL code.

Getting...

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 €18.99/month. Cancel anytime