In last post we saw basics of how to Create Table and created a Loadout Point Table.
Today we will continue from where we left in previous post. If you missed previous post you can find here AL Basics – Part 2.
We will create one New Table say Working Calendar Time Slot. Since no new concept used in this table so without explanation I will directly share the final structure of this Table. I am using this table in today’s next Table which I will be creating later below.
So here is the structure of this Table.
Now coming to today’s topic. Creating Field Triggers & Functions.
I will be creating a new table Appointment Calendar Setup.
Here is the structure of same, and explanation follows after screen shot.
In this Table the Loadout Point field TableRelation to the Loadout Point table that we created in our previous post.
Similarly the field Start Working Hrs. & End Working Hrs. field, OnValidate() trigger is implemented which call to a function/procedure CreateTimeSlot() defined in this table itself.
Field Start Working Days & End Working Days is defined with option type.
When user Enters the Start Working Hrs. & End Working Hrs. we will create the Time Slot for that Location (Loadout Point).
Finally I have created a local procedure in the table, which as per the information entered it creates the Time Slot in Table we created above Working Calendar Time Slot. Also see I have created few local variables to the function of different types. You can see there is no difference in writing the code, it follows same syntax as in our Navision C/AL. Advanced coding options and what’s new will discuss separately in future posts.
Till here we have our basic structure of our Extension. We will see how to design page in our next post.
We will come with more advance points on Table Later as we proceed in completing our Extension. There is lots of things to share on this topic but sometime later in future posts. First Let us cover all Object Types.
2 thoughts on “AL Basics – Part 3 [Table Continued]”
Comments are closed.