Dynamics 365 Business Central

Injection Mold Control

Ok, let´s try to make an extension following the “Universal Code Initiative” and give Business Central some Injection Mold Control Support.

Why this? well, i´m going to make a demo session for one lead and I had the time; its a very basic control for the mold control in production and (yes, I did it! even it seems a little stupid) assemblies.

The general idea is:

In injection plastic companies, they need to control their molds, when they bought them, how much did they cost, how many times have they been used.

Also, they need to insert the molds in their production processes in an easy way.

So, I designed a “Mold Card”:

You can add the mold to the system and you can use a serial number provided by BC or type the serial number.

After the mold creation (or before) you can go to the Fixed Assets, create a new fixed asset and acquire it, after that, you can go to the Mold Card and assign the FA to the Mold.

I added the date of manufacture of the mold as well as the date of start of operations, Why? because maybe in the future I want to add a MTBF and /or a MBTR fields based in time, or set a “use” limit based on an integer or decimal field, they sometimes even ask for a monthly “use” limit to avoid mold degradation.

Also, you can add later the different mold parts, a mold can have two basic parts, injection and ejector but sometimes they need to add the sprue bushing and more components like pins, sleeves, strippers or other parts that can be spareparts or not.

in this industry type, they need more special info so I added the specs section to control the injection mold process

The mold material

And the related pics

The next step is to join the mold to the Machine Center that will use it and here we can add later a “allowed machine centers” because not every mold can be used by every injection machine (remember the Mold Process?) and we can also use the Mold Material to select the injection machine too.

So, lets extend the Machine Center Table and page

With this you can control the mold usage in an easy way, any time you create a new Production Order you have the machine center in the route

And when you post the Production Journal

Or when you post an Output Journal

You are going to have a Capacity Ledger Entry

And using an Event Subscriber, we can insert the movement to an special mold entry

Ok, let´s add the Usage Control Limits field with a Decimal field in the mold card and make the usage/limit comparison

Lets talk about the UI

We need to add the pages to the system but, we need to think where. Why? because you must think about what part of the erp you are complemented, my case is Manufacturing so, I added the menu to that area.

As part of the UI, we need to add the different languages according the market or gave to others the option to add their translations , I don´t have any special tool, so I copy the xliff to excel, order, add some fields, concatenate some columns

And finally create a new xml adding the target label

Ok, now, we need to address the security because we need to add an special file called permissionset. We can add existing PermisssionSets and let VSCode to add the extension tables, pages and codeunits.

What´s Next?

Well, that depends on your customer target, if you develop this for a sigle project, you can compile and build you extension to deploy it in the customer tenant as PTE, if you follow the “Universal Code Initiative” rules,

Per Microsoft clic here (need Partner login)

Per Waldo clic here

Per Stefano clic here

Let’s explain some points

If your code modifiy any Business Central base object, you pay as if it were a fine because you are modifying for on-premise deployment and you need to add this to your yearly fees

So, for the code I made for this page, will it have to be paid or not?

According to the following, it would not be necessary

My app.json has “target”: “Cloud”. so the second point is avoided.

The only integration that I put in my code is the phone camera but I avoid any net control copying the standard from Microsoft. the other points doesn´t apply.

As partner, you need to enforce a technical development policy, “never touch the base objects again”. You need to force your vdevelopers to learn the new rules, use the azure functions, powerapps and others like subscribe to events in BC code, if you dont do this, your solution will be a very expensive code for your project/customer.

As an existing NAV user, you need to understand these changes and ask for a pre-upgrade analysis before making the decision to upgrade to Business Central.

What should this pre-analysis include?

Well, first the partner need to check your code and look for the existing developments, ask you what their purpose are and request for a use demostration.

With this, the next step is check if the BC new functionality can replace those developments. If you can´t, you need to do an appsource search for existing apps that do the same or very similar to the development .

The last option is to “revamp” the existing code because this is the most expensive option, or maybe not, that relies on the appsource extensions prices.

Finally, I uploaded the app to my tenant

And because i’m respecting the rules

I get a “loveyour app” message (thanks adolf hahahaha, the other option is the mexican president with princess leia bread ears).

The code here