Hard Coding Field on Customer Card

Hello all!

I’ve searched around the forum and was unable to find any solutions that are recent for this issue I am having. The Microsoft documentation was not very helpful either, so I’m hoping someone here might be able to assist me.

We use Dynamics 365 Business Central and LS Express for our retail garden center. We have an ongoing issue with cashiers forgetting to assign a Tax Area Code to customers and thus not charging tax on those transactions.

I’m attempting to write an extension to hard code this field for all new customers that are created because it is not included in the Customer Template. I’ve successfully implemented some extensions using the designer in the sandbox to add fields to pages, but I would assume this would involve creating a trigger to run a codeunit when a new customer is created. I cannot for the life of me figure out the syntax, though.

Would any default codeunits in the Job Queue be able to assist me?

Do I make a custom codeunit that runs when a new record is inserted into the Customer Table?

In what way would/should I use InitValue and what context (page extension, trigger, action)?

Any help at all would be greatly appreciated!

Hello

Besides from that we cannot help you with LS Retail as it is not part og standard NAV/BC then the only suggestion is to use the trigger:

OnAfterInsert to set the missing content og a field to a table. This is a very basic part of the Development-environment, and if you are not familiar with this - then you should probably join a training class to learn the basics to avoid to waste a lot time finding things out yourself.

/Palle

Thank you very much for the suggestion. I plan on enrolling in a course today.