JV B/C

JV B/C E3: Learning

Jeremy Vyska Season 1 Episode 3

Today we're talking about how we learn, how we teach, and processing information.  Let's tour through the Business Central Sales and Purchase Document Flow.  Finally, for the new to BC Devs - Table, Records, what?

0:00:00-0:01:05 Pre-Intro Talk
0:01:05-0:01:37 Intro Music
0:01:37-0:20:43 Talking about Learning and Processing
0:20:43-0:39:55 Document Flow in BC
0:39:55-1:00:42 Dev Basic: Table, Record - what is it really?
1:00:42-1:02:03 Outro

Jeremy Vyska:

Good morning everyone, or whatever time it is where you're watching seem to be developing Hatter habit pattern of doing this exactly at 9am on a Sunday morning. But enjoy this whenever it is your time today we are going to be talking a little bit about learning and the strategies and thinking about how we learn. And then for our functional area, we'll be talking about the document flow of how core functionality and Business Central works. Because I've seen a lot of people in power platform be a little confused as to how BC does things which is a little bit different. And then lastly, we're going to be talking about in depth for developers a little bit more about what's a table versus what's a record and some of the different pieces to that. So enjoy, and let's dive in.

Unknown:

Okay, so good morning, everyone. And let's talk a little bit about learning. I've done a couple of conference talks in the past year. And in both of them I mentioned or speak to the idea of learning. And, you know, we've had some conversations with our kiddo who is a teenager, about some of the different challenges that you can find in how we learn. And a lot of times people have the habits of learning that they picked up in school, whether it be you know, through the big foundational School of Elementary and Secondary School and that sort of thing. Or if they continued on to university, they have some of the study habits that they acquired along those lines. But a lot of times, if you've not really sat down and thought about it, you haven't put a lot of thought into the how you learn. And I kind of wanted to talk a little bit to that, because I've done a lot of training sessions for people at various levels of skill and background knowledge on how to use Business Central. And a lot of those times there are also classes in how business problems are solved. One of the things that people forget is that when you're sitting in the room, and you're figuring out, you know, how are we going to do inventory cycle counts, you have to know a fair bit about inventory process to give good advice that makes sense for that customer. Well, you know, the thing about bad is that there are so many different things to always know. And it's a real challenge. We did a chat in one of our earlier episodes about what you don't know you don't know. So let's talk today about how filling in those gaps works. The, the topic that came to mind is I had the pleasure of taking something called the Great ADHD reset earlier this year. It's an online group, ADHD coaching class. And while it wasn't a lot of revealing things for me, since I've gotten pretty far along in my voyage of understanding how I think and how I work, there were a lot of great structural pieces. And one of the things that we talked about, that had a lot of good value was processing styles. And there is some value to thinking about how do you process information in different contexts. For example, you know, oftentimes when we're training people in how to use Business Central, you know, we'll set up a classroom. We might set up a team's meeting in the past couple of years, but some mechanism of now someone is going to sit in a room and they are going to watch you explain how something works and You might, if you're pretty enthusiastic teacher, you might even put together some exercises, some practice ways for them to do the process that you've just taught them. And this gets spoken to in the MCT training, I have been a Microsoft certified trainer, there was a period of several years where there wasn't any business central slash nav certifications. So I let it lapse. And because you had to teach the official official courseware, and the official courseware went away. So but they teach you in that, to acknowledge that people are different types of learners as well. And they addressed a few of the processing styles that I've come to learn this year. For example, some people are very visual learners, they, they see what's on the screen, they can process that information, they can internalize that and make that part of their skill set. Okay, some people listen to how things work, they need it talked through to understand the process. And the process of hearing that is very important to them. Some people are very much the sort of folks who need to be hands on and actually, you know, do the work and do the process. And so when they train you for doing training through the train the trainer program for the MCT, they teach you to build your curriculum and build your courses to speak to a variety of those different learning styles. Oh, that's pretty good. One, I think my favorite point that was made during my train the trainer session was when you're developing your curriculum to one of the most successful strategies for sharing information to people to get them to learn new things, is the Sesame Street approach. And for those of you in the US, you might know it, or at least was the Sesame Street, I can't speak to hit in the past 1520 years. But effectively outline what you're going to learn in the upcoming session, repetition through those core concepts. And then a recap of what did you learn. And that mechanism is a great structure for helping people understand on a module by module basis, what are you supposed to know, here's what you were going to learn. Here are those pieces presented, and you want to keep it to three to five topics within those spaces. If it's more than that, that's too big of a table of contents for people to hold in their head. And then, at the end of that process, this is what you should have learned. And if you follow that structure, when you're teaching, or more importantly, when you're trying to teach yourself, I ain't learned it more naturally reinforces what you're trying to pick up. And if you're creating those courses, for others, that also gives a really good break point. Because brakes are important, brakes are valuable for letting things process to let things sink in. Remember that the idea of teaching and learning is that you are taking external knowledge, external wisdom, and you're internalizing that. And that's why I liked the idea of talking to processing styles. And the processing styles that I was taught in the coaching classes here include the visual and the auditory, and I appreciate those. But they added some other fun ones on it that I thought were pretty fantastic. For example, some people are verbal, in that they need to talk out the process of thinking through things that are important is something that they need to talk through. You'll see this sometimes when you're teaching other people and people will have questions. And the question might be short, but they're explaining a lot of stuff to lead up to that question. And that person possibly is a verbal learner, and they're actually processing through what you've just taught them to be able to articulate the part that they didn't understand. And that that was a really interesting one. Another processing style that I wasn't familiar with was kinesthetic, that some people might need to move, to be physically engaged with their space in some manner and other to be able to focus and understand. You'll see this in people who are fitters like me. He helps see this in people who need to always be fiddling with things, this often comes out in the form of some of the people who will take lots of notes, they might not realize that that the process of the moving and taking the notes is helping them focus on the listening and the process. And we can find information, notes as to parts, or maybe even three. So it's more than that. But I thought that was sort of interesting. And again, brakes and exercises are valuable to adding that kinesthetic experience to the workflow. So if you're the sort of person who is that then No, that can't fidget toys, there's this beautiful community of spectrum people. And there are all sorts of little things that you can just have in your hands to fiddle with and play with. I almost always on the stream, and fiddling with something in my hands. It's why my hands aren't on screen. And you're, I don't type during this part of the sequence, because I will tap any tappity I also thought it was interesting that there's a tactile, which I interpret in the world of learning software, that those are the people who are much more about the I need to learn by doing that the process of doing something with my hands, and interacting with what I'm trying to learn is the key thing to me. That made sense. Okay, you know, that's it, I couldn't see you tactile being also process. But the the other three were sort of fascinating to me, that I hadn't really thought about, of conceptual, intuitive, and emotional. And that kind of was not anything I had put to a thought before of some people need to understand the broader context, you need to understand the whole concept of before you tell me to go to this screen to click this button, I need to understand when we're, what's the end goal 20 fields from now 20 clicks from now, I need to have that roadmap ahead of me to be able to feel comfortable to process this. And this is where, for example, many educators will come from the syllabus, School of thinking of that you need to have that educational outline, what are things going to be learning? Again, particularly people who are spectrum me, people, we need to have some sort of context for, okay, you're teaching me something, but I don't know why. Or I will learn a lot better over the next hour and a half. If I understand what, in broad strokes, we're going to be learning today. So I can prepare to receive that. So I can process this in the right way. And on the flip side of that, then there's also intuitive, some people work really well, by given a little bit of time to kind of free rein and have their own aha moments. These are the type of learners that you can give them directions, but honestly, like a visitor driving somewhere, they'll they'll learn it better through the process of getting lost and figuring out their way to the place that they were trying to get to. So I think that's kind of interesting. Emotional doesn't come up as much in business, ERP software training. But I have seen where emotional learners can have a negative impact. For example, there are absolutely times where I was teaching warehousing people or financial processing people how to use pieces of software. And what they were clearly hearing is either, oh, gosh, oh gosh, this is so much more work. And I'm already drowning. So they were building and building some negative emotions that were inhibiting their ability to learn. And thinking about this as a processing style. This meant that people coming to the classroom, maybe they have an emotional content connection to what they're going to be learning today. And if you can work, to acknowledge those people to relate to them a little bit better. You make you acknowledge that they're worried about these things, you acknowledge that and maybe can give them some resources that speak to those worries. And as you peel away those layers of worry, there's more room for them to learn. So you know, someone who is really worried about like, oh, Okay, we've gone to this screen, we had to release it here, we then had to go create this process here. Now we can go to this screen over here. And now we can print the thing I need to give to the forklift driver. As you're demonstrating and teaching these things, they're going to be thinking about, Oh, God, that's a lot of steps. Well, you can address some of that worry, by going, I'm going through this step by step slowly, so that you can see how this all works. After we go through the process, I will show you how quick it can be if you need to do this quickly, because the truck is going to leave in 10 minutes, that sort of acknowledgment will relieve the stress of learning what's in front of them. So I thought that was a really good add to the landscape of thinking about processing Styles was that emotional connection with what people are worried about in the classroom is also a big deal. So how do you connect all these different pieces for yourself? Well, that's an interesting challenge. The framework that I worked through in our group learning, which I thought was really fascinating, is that all of those different processing styles vary based on the context, sitting in a classroom, learning from someone, this is how you do a process is different from when you get back to your desk from a vacation two weeks later, you know, how do you remember that? How do you remind yourself of that information? Or, you know, six months down the road? How does? How do you potentially stay focused and engaged with that learning? So it's important to kind of think through some of those different things. And by just building that map, you might give yourself a little more freedom and understanding to how can I process this information a little bit better. For example, you know, one of the things that you might be much more of a kinesthetic sort of person, you're very active person. And the idea of sitting still in a classroom and listening to someone explain something for two hours, is just not what you're going to be able to do. Or it's very challenging for you to process that. Ask the question of you know, is there any ability AI can record the audio of this classroom, record that, throw it on your phone, and take a walk and listen to it while you're walking around, that might engage you better, you might start going, Okay, now I can connect with this a little bit better. So think about some of those different pieces and try to give yourself the structure that a classroom would give you if you're learning by yourself, have some loose objectives to Okay, I need to learn how to code BC. Well, you know, if you're trying to say I need to be able, as a solution consultant to add a field to a customer card, because that seems like something I should be able to do as a developer. Yes, but that's a big outline. So work with someone who does know how to do that, and break that down into the smaller modules so that you can potentially say, I can set aside an hour, an hour and a half to learn these two pieces of that. I had a solution center, I worked out where I ended up temporarily, for about a year or so. Being manager of an IT consultancy department. In addition to doing development or busy times, when you're a small company, you do all the things you can do. But you know, the folks that we had the opportunity to acquire that made that were a good fit culturally, that made sense for the company at the time, had a lot of stuff that they needed to learn about what we did as a consultancy, or as working with Microsoft products. And what was extremely helpful for them. And you probably should do this for yourself is sit down and build a high level doesn't need to be in detail, just high level visual roadmap that you can say, Okay, I need to learn these 20 to 30 topics. I don't need to be a master of them. Maybe you do need to be mastered. But take all of those, build yourself some sort of visual representation of that sequence of all the different things you need to learn. Print it out, stick it on the wall, put it somewhere where it's outside of your head, and then as you're working your way through it as you acquire those different skills, check them off visually give yourself the the cue of I'm making small progress On this big plan, if you're not sure what sort of learning objectives you should have, well, there are wonderful people in the industry. LinkedIn has great groups. Twitter has great communities around people chatting with things, the discord servers out there, if you're not sure what your roadmap should look like, reach out, there's lots of places for you to get some help building a roadmap for yourself. So I don't know if that was helpful. But hopefully that gets kind of you thinking about? How do you teach yourself? How do you work with others learning things. And now, with that in mind, let's let's dive into some actual hands on business centrally sort of things today, I wanted to talk to document flow in Business Central, because I've chatted with some people from the power platform side, or coming from other solutions that are using non Business Central ERP systems, or QuickBooks or the equivalent of those different products, where they understandably get a little confused as to the nature of how business central works. From a document and information structure perspective. What do I mean by that? Well, for example, the sales order, when you post that and you ship it, and you invoice it, the sales order is gone. There's not really any record of that document anymore, it disappears. Now, there are some archiving functionality where you can archive that sales order. But there's not really a process like where it's a lifecycle document. I've gotten the impression that people outside of business central are looking for, you know, how do I know when this sales order becomes an invoice? How do I know when that invoice has been posted? How do I know when that invoice has been paid? Or how do I know when the sales order has been shipped? There are lots of great questions around the lifecycle of a document. I don't know any other ERP systems. It's a big blind spot for me, there's so many others out there, for sure. So I can't give you specific compare and contrast. But I wanted to kind of dive into let's talk about how all these work. So pardon the fact that my mouse is a very clicky mouse. And I've noticed in past recordings that gets picked up quite a bit. That's fine. So let's let's talk about this. So a sales order in BC, is a header, as as we've kind of referred to before. So we've got the, you know, let's say this is for the ski house here. And on the header, we've got some of the different fields that could be related for this, like the due date for the when is it due to be paid? When is it due to be delivered some of those financial pieces that are part of the header. And then we also have the lines. So let's, let's grab some things that are maybe in stock, because that would help. I do find that it's interesting slash frustrating to me sometimes that that drop down and the Select Item List. They don't show availability. I do find that sometimes very frustrating. Availability has its own complicated topic. And that changes significantly based on what you're doing as a company. So I can understand why. But it's sometimes it's a little frustrating. So let me grab another one that has some stock 1016 S Sure. I wanted to specifically grab a couple of different lines where we're going to say okay, we're going to sell four of these chairs and two of these chairs. Okay, and I've been notified that the quantity I've selected for this Mexico chair is too low in that spot. So let me see what's up view by it's probably a location based issue. So to do to oh no, okay, it's because the while they're in stock, it's because they're coming in their inbound stock. So I chose poorly. And this is me needing to get to know the Cronus data a whole heck of a lot better. It's occasionally a real challenge for those of us who are teaching and demonstrating. So just to get look good 1920 A sounds good. Let's delete this line if they're not out of here. Okay. So stumbling aside, I thought show me availability by location, please. Okay, well, allegedly, I should have some in stock. So I'm going to guess that it's complaining because there is probably existing sales orders that are consuming this available amount? I'm not really sure. Anyways, so we have in this sales order a couple of different lines of items. Well, they, off to the right, we have our quantity to ship and our quantity to invoice. Well, what happens when we ship just maybe half of the first item, we ship only two of the four that are due to being quantity shipped? Well, that's going to create a sales shipment, that becomes a posted document the sales shipment that shows that we have quantity to Okay, let's do that. So let's change this quantity ship because this is a work working field doesn't change our balance off to the left here we have four that we intend to ship. So now if we do post, now, I'm going to speak to this a little bit in just a moment. But when we hit post, we get the option to ship invoice shipping invoice. And that is because the shipping and invoicing are separate processes and separate destination documents. So I'm just going to do ship. Okay. So now we can see on our sales order that the first line now has still two quantity to ship, but it has quantity shipped of two. Well, if we go on back to our posted sales shipments, which is not I think even in the menu of this rule center. But if we go to posted sales shipment and our tell me, we can see that we have a posted sales shipment on today's date. And it shows all of the lines that were on the order. So we have our 1936 dash S, we have our 1920 dash as both as lines. But the only line with quantity is the first line where we did the shipment of two. And we can also see up here in the header of the posted sales shipment. This is order number 10105, which was our order number. Okay, all right, that gives us some manner by which we can connect to this sales shipment line back to which order number. If we pop into the about inspect to this page, and we look at the line level information for this, do we see we do. There is a hidden field on the posted sales shipment line that connects this line to which order number and order line it came from. The reason for that is that we can potentially have mix and match scenarios where we do ship multiple orders in multiple different ways. We're going to address that as part of an invoice. So let's close up the Inspector. We're going to create another sales order for alpine ski house because why not? Let's see here. So we'll do a new one. We'll go into our Alpine Ski house. And this one is going to be maybe we did some sort of service for them. So I'm going to grab a GL account that maybe it's going to be some sort of we did a repair job for them that we charge for some such don't it doesn't matter. So we'll do that as quarantine one and it was 500 pounds of repair work to something that really matter what you know, I'm going down a rabbit hole but slightly incorrect. I want to be able to show combining invoices. And for that we need our items. So Nope, we're not going to do a fee, we're going to do a separate item. So a different department called up and they also wanted one of those funky chairs. Sure. We'll do just the one and that's fine. Okay, so now I'll go ahead and post and ship this as well. We'll say Okay, there we go. So now this has been shipped. And again, same sort of situation now where I have a sales order that's open, it's waiting to be invoiced. There are now two posted sales shipment documents that I've got. Well, one of the options that we could do, and I'm clicking too quick here, one of the options that we could do is we could come back into the first sales order where we did the partial shipment. And we could change the quantity and invoice on this to say we want to invoice for the two that we've shipped. And we could do post to open up our Posts menu, and we could select the invoice option. But we know that we have already now shipped a couple of other chairs to this particular customer. So let's invoice for all four of them. Well, for that we can create an invoice for alpine. And we have the option in here to go get the lines that have been shipped. Let me grab I believe yeah, here in the sales invoice. In the line section, I have a function that gets shipment lines. And lo and behold, here are many purchase no sales orders, where we shipped the two and the one. And we say okay, well, let's select both of these and say OK, and now we have a combined invoice that is for those two different orders. Well, now let's go ahead and post this. We can say we want to post the invoice. Yes. Do I want to open a posted invoice I do. So one of the things you'll see very quickly about this invoice is there's a couple of peculiarities to it. First of all up in the header of the invoice, there is an order number field and it is blank. Because this posted sales invoice, which is a separate data pile, a separate bi endpoint, a separate document, all that sort of stuff. This is actually a combination of multiple orders. So the header doesn't know what order number it is. Because there isn't a single order number this is, which means that for example, in the posted sales invoice list, we cannot show or filter on which order number it is, this can produce a lot of strange effects and limitations that you maybe you're not aware of. Secondly, down here in the lines we have not only in the two item lines that we've shipped it for, but it brought in the shipment description on that. And what's interesting for me when I work with users about this is we're looking at this and there is no where on here that we have any sense of what document did this come from? And we can scroll off to the right on the lines. There's no like Order Number fields showing on this to say which sales order number did these come from? In in past times, you might have been able to customize and show the different fields. I don't think we can do that. If we personalize this one can we show sometimes the fields are editable, sometimes they're not. And if we look in our personalization for the line segment here, there's there's no order number. It's not not here. So once again, we go sneaking off to our inspect pages and data for this particular line. And anytime you open the page inspection if you aren't familiar with using this, you'll have to make sure you click on exactly what part you want. Once you've opened the inspector when you initially open it, it will often be referring to the header of the page or on because it doesn't have a context. So if we click on the line now, here if we search in the fields that are behind the scenes, now we can see there is an order number and order line number on this particular posted sales invoice line. So if we close up our inspector, and we go back to our sales order list, you'll notice that it did something a little strange here. If you've only ever used the shipping invoice functionality on the sales order, or you hit post and you hit invoice and you always do it as a one to one. You have not experienced this yet. What it did was it left the sales order open. It is fully shipped and it's fully invoiced. This sales order is effectively done, but it hangs out in this list forever. Now at this point, if we wanted to, we can go ahead and manually delete this. And that would be fine. That would work. And that would mimic the fact that now over here in our first order where we still have to, to ship and we still have to, to invoice and all that, if we were to do a post and ship for all that's remaining interesting, I had left quantity, the invoice blank. So let's fix that shipping invoice gone. So now once on the sales order, I've hit post and everything is complete, it automatically deletes the document for me. When you do combined invoicing, this can surprise users, they get a specially brand new people to be seen, where when you post a sales order, or you post a purchase order, everything we've done here applies to the purchase order as well. When you post a sales order, and it completes the document it deletes that can be a little unsettling. And then when they go to do a combined invoice they're like, but it left to this other one. And I don't know why it's sometimes it works. And sometimes it doesn't. And there is even a job called delete invoice to sales orders that you can run that will delete orders that were not automatically deleted after completion. For example, when several sales orders were completed by a single invoice. If I were to run that job right now. And I am we'll leave it unfiltered and just say anything that applies our sales order that 101006 We'll see goes away. So if you do a lot of combined invoicing, it's a good idea to run those delete jobs on a regular basis or this list gets pretty long. So this process now, it makes some sense, but it can confuse the heck out of people that that document, you know, the 1010510106, those two orders that we just created, they're now gone. There's nothing in the system that connects those pieces together. I don't think the default Cronos workflow, there is a sales order archive functionality. For example here. And you can see there's nothing show because sales order archiving is not turned on by default. So now, we've got posted sales invoices, we've got posted shipments, but there's no more sales order. So it can be a little challenging for folks who are new to be seen to understand that a single sales order or a single purchase order, can go to a single posted sales shipment and go to a single posted sales invoice. And that makes reasonable sense. And then the headers are connected and combined. Cool. That makes sense. You can filter on the sales shipment screen. If we go look at the posted sales invoice, I believe Yeah, it's not in the list. But if we come down to let's get today's if we look at the one that I just posted that did complete, we can see in the header, we've got an order number. But the ones that were combined don't get that order number. So it can be a little confusing for users not understanding. And even like I said, professionals who have worked with it before that technically a single sales order can go to multiple sales shipments. And separately, it can go to multiple sales invoices. And because of that process where there is no single master document that can make it really challenging for people to do the data analytics on it later on. So I hope that kind of connects a little bit of what is the actual process flow there. And understanding why sometimes you need to do things a little differently or you find outlier data or sometimes fields are blank in spaces that you don't expect them to be blank. That's that's the why of it. So hopefully that helps. Okay, fantastic. Well, that is the one I wanted to chat about from on the implementation side of things. So hopefully that's been of good use, we're going to swing over to talking some tech around the development side of things a little bit, because we started to talk about different object types and some of the different variable types. And today, I wanted to dive into one of those because I take this for granted pretty easily. It's something that I had to explain to someone recently, and it was not connecting for them immediately. And I had to really think about well, why didn't it connect with them immediately, we had talked about how the table object is a set of fields. So like, Let's take for example, in our base app, if we pop open something relatively simple payment terms, if we go to the table definition of payment terms, we have in here, zoom this up a little bit, make it nice and easy to see for those of you who are visually watching along. In the Payment Terms table we have field one is code we have field two is due date calculation, field three is discount date calculation, field for discount percent. Field five is description. Now we've got a few other little auditing and assisting fields. So there's only a handful of fields on this particular table. If I wanted to work with the Payment Terms table in code, it's fairly easy to understand that I can assign things to these to these different fields. So let's make a new code unit real quick interest in a root of our folder here, let's grab a code unit. And we'll say tinkering with tables. Sure. So I've got a code unit, where I'm going to say I would like to have a function that auto generates a set of payment terms in that table for me. So I'm going to create, and I'll just keep this simple. And we're going to use this as the on run trigger. So if someone runs this code unit, it does the following steps, we're going to do a couple of pieces of hard coding, which if you're new to development means that we're putting right in the code, the values that are going to be created. And in production environments. That's kind of a, you should not do sort of thing. You should not hard code things. For the most part. There are good circumstances, but we'll talk about that in a whole separate episode. So if I want to work with a separate table like payment terms, I need to define a variable using little bar logic here for the Payment Terms table. And what's interesting is, is that first of all, if you hadn't worked with ale so far, you have to strongly type all of your variables. If you're coming from other programming languages, everything is strongly typed, we have to define exactly what this variable is pointing to. So I'm creating a new variable that here is my type, which is that's how the format goes, we have named colon, and then we have typed, and then we potentially have any extra info that comes after type. For example, I am saying I want to work with a table object. And you'll notice that to work with a table object I'm not typing payment terms is a type of table. That doesn't work. There's there is no variable data type called table, which is delightfully confusing for folks who are new to this. So let's grab payment terms. So we can see here I'm defining a variable that points to a record called payment terms. And if I mouse over each of these different pieces, you can see that payment terms it gets a tooltip that then lists all of the fields that are on that table. So I know I'm looking at the right thing. Here's the code, here's the description, there's those date calculations, and all that sort of stuff, and all of our miscellaneous extra things. There are some fields in this list that are automatic that you may not have seen. But that's another topic. If we hang out and mouse over a record, we don't get any info. If we mouse over payment terms, the tooltip says it's coming from the table payment arms. So what the heck is with the two different names for the same thing? Well, the table is an object type and record is a variable type. And what I like to think of it as is that the table is the definition of how all the data is stored. And it then can be accessed via a record. Data Type. And record comes with a whole bunch of extra stuff. What kind of extra stuff let's, let's use a variable and take a look at the IntelliSense that pops up when we use payment terms. And we type.we get a whole bunch of stuff in our tooltip drop down here for the IntelliSense. We get these four things right up top here, get description and current language, get due date calculation, translate description, what are those, they get this weird little purpley icon. If you've not seen it before, in Visual Studio code, that means function, roughly. And then we get these little blue icons with those fields that we saw, like code and description, the date calculations, and we can scroll on down even further. And we start getting more of those purple icons, which are all sorts of things like add link, our fields, loaded calc fields, copy filters, tons and tons of stuff in this list. What the heck is going on? All right, well, that's because the table defines a few different pieces, the table defines the fields. And if we go back to this, I'm going to keep it open this time. If we had scrolled on down past the fields, there are also some procedures, aka functions that are callable pieces of code on this table. And those were the things that we saw in the first part of the list. So in our IntelliSense, these first four are specifically procedures that are designed to be available to us anywhere were using that table object, and then we get all the fields. And then we get a whole bunch of other extra functions, like what is, you know, count count makes pretty good sense. We can guess at what does this do. If we select that from our IntelliSense and mouse over, it tells us that this procedure count counts the number of records in a table? Well, now you just hit us with a fun thing. Here, we're working with a record variable that is pointing at a table. And the count function tells us that it's counting the number of records in the table, what happened in the mix and match on the language here for new people. Woohoo, that confuses the heck out of folks. If you're brand new to database development, whatnot. And even if you're not necessarily, you get a little lost trying to understand this. So let's see if I can doodle up maybe some explanation that helps as we talk through this, I don't know if I can or not, we'll see. So on the table object itself, a table contains all of those fields that data lives in. And as we would expect, within a table, we can have multiple rows or records that that data lives in. So here, for example, I might have two records, individual rows of data. So a, a record inside of a table object is effectively a row of fields and the fields are like columns. So you kind of have this data grid that lives inside of the table. Additionally, in BC tables can have separately little functions that you can call. So that way regardless of which row you're on, you're able to call these functions and those will work with whichever row you are currently active on. And what do I mean by that? Well, if we come back and look in here, we have some functions. Let me close that and we come back to you know, I keep closing up the wrong thing here. If when you look at the Payment Terms table, when we call get description in In current language, one of the functions that is on this table what that does is it attempts to translate based on which code is the current code of the Payment Terms table, it attempts to translate the description if there is a translation. So this procedure knows that it has to be called from a particular row of information, ie a particular record of information. So, if we wanted to pop a message for some reason of the description, then we could say, payment terms message with a friend and payment terms get description in current language, and it considers this valid code. It assumes that your payment terms record variable, which is not the same as a record in the table. Hey, hooray for naming. It assumes that your record variable has a context meaning that we have told it to go to a particular record in the table. If we go look at payment terms for a sec, just to give some visual for those who are new to BC, if we go to the Payment Terms table, for example, a common thing would be like 30 days is a code. The due date calculation is 30 D, which means that anytime we use this payment term on a sales invoice, whatever date is our posting date, the due date will be 30 days later. And we can see for example, in the background here, this posted sales invoice we were looking at earlier, likely use that logic because we got a due date automatically. That was the fifth, like, okay, cool. And we can see that the description here is net 30 days, well, if you're sending this invoice to a French customer or German customer, you might want that to be translated. And there is a engine in here that you can say for a given language, I want the description for net 30 days to be changed to this other thing. Okay. So that's what we're looking at here is that theoretically, this is going to translate the description, this function will go get that? Well, the thing about it is is that a record variable is not only pointing to the table, but it also points to a bunch of different stuff. So the table has records in it. But a record variable is almost a layer on top of that. And what I mean by that is that it does point to a table. I don't know why my doodling sometimes cuts out a little there sorry about that. The record points to a table. So that way we know what all of our fields structure is. So we get all of the funds in packs of we potentially know what fields there are on this table. And we also know what functions there are on this table. But we also get a bunch of other stuff in the variable as well. The other stuff we get is we get the built in functions, that automagically come as part of being a record variable. That includes things like the count function that includes any number of different procedures. But what we do also then have is we also have on top of that, we have what filters have been applied to the record variable. And additionally, we also have positional information on where we currently are. So there's a lot of extra info that comes with being a record data type. So, for example, typically when we work with a record type, the first thing that we would often want to do let's say our message is we want when we run this code unit we want to show the translation for the net 30 days. payment term is what we want to do for this so So the very first thing that we would do is we would filter for the desired data, we then would move to the desired data. Yeah, do you. For those who are just falling audio, my typing leaves something to be desired this morning, move to the desired data. And then we can operate on that data. So when we're looking at our Payment Terms table, when we first initialize the record variable, it has no information about where are we what line are we on? Well, in my UI, I can just click on it. Okay. That makes sense. And as far as filtering goes, I could show how we might filter on this to say, anything that starts with 30 star. Well, now that I've applied that filter to my code, we can see this gets me my 30 days. Okay? Obviously, the code I'm doing here is bonkers. But it gives a core concept. So payment terms, what we can use is one of those built in functions, that is way down in the bottom of our list here, this set filter. This allows us programmatically to do what we just did in the UI here, where we're changing the filter list. So now we can say just like here in the scene, we can click on add a filter, and we say which field are we filtering on, and then provide a value. In the set filter function call, we can say set filter on code, and I can say 30 star as the parameter that I pass through the set filter function. Anytime you're working with these procedures, there is some, usually some degree of tooltip, that will tell you a little bit about things. It doesn't always make a lot of sense. So just be aware that sometimes you're going to run into things that you're going, what the heck, why is this talking about set filter takes a parameter or a field called Joker? Yeah. So we'll, we'll talk about that. So I've now set the payment terms, if I were now to say operate on the data without that motion, which is a common rookie mistake of set all your filters, and then forget to move. If I now do a message on the payment terms, and I do my get translation, get description, current language function. This without the comments might look like it would work because we set the filter to 30 plus, so we're all good, right? Well, no, you have to still have the motion aspect. So thinking about it from how we're working with. On this table, we've got all of the individual records of data, the rows of data in here, we've now applied the filter layer, but our position in the table hasn't changed. And so we as developers have to do extra work to move once we've set the filters. Even though in the UI, when we set the filter in the UI, it automatically dropped us right to the right record. Well, developers, we might need to set you know, 1020 filters right in a row. And within that context, we don't want it to every single time go back to the database and go, can I have all the records for 30 Star please, after all, sometimes, these filter sets if you only applied one filter, you might be talking about, you know, 1000s of records, so it wants you to have the opportunity to do your own work. So in my case, one of the ways that we're going to use move is we can use one of these different find functions. So we can use Find first or find last to try to get to a single record. So I'll do fine first. Now, if you've not worked with the record types before, there are lots of different things we're going to dive into about this but I I realized not too long back that the this was something that was a real challenge for someone new to BC to work with. Because we're when we're looking at this, we're saying that we have a table which contains records, a record data type points to a table and within that record data type containing those tables. There are individual records we have to move between record table record. That that is a doozy of an understanding gap. So it really does help to just have that Background and in our next episode, well, we'll go ahead and start saying, Okay, well, how do you potentially work with some of these different records? What can we do with those things? But I hope that that is going to be a more useful understanding of how, how the language, you reduced clarity for maybe some folks who are working with this for the first time. All right, we are at the hour mark, I can babble about this for days and days and days. But there are always other things to do, including some different pieces. So I hope that I hope that this has been a useful session for folks, that it gets you thinking a little bit about the ways that you learn or the ways that you help other people learn. And let me tell you helping other people learn, or that is a very big thing. I encourage people who are bringing on new people into their practice, try to bring on two or three new people at the same time, so they can collaboratively learn together, you learn more by trying to teach the different things. So we also talked about the document flow. And hopefully that makes more sense. Now when people are trying to build Power BI and automates against BC. Like that's how it all works. And if you've been a newbie developer who is trying to understand how data lives in the system, how do you work with the data in the system? Now hopefully some of the language that was maybe confusing around what some of these different steps are, has a little more clarity. So with any luck, they will continue to build on all of these different pieces and I hope this has been of help. So Goodbye, everybody, and we'll see you next week. Take care everyone

People on this episode