Hi, we are running into a problem when creating an...
# suitecommerce
m
Hi, we are running into a problem when creating and deploying extensions. We need one extension that's going to be used by others to be loaded first, we've deleted all our extensions and deployed the extension we wanted first to make it show on the top of the list, then when we deployed another one, that one went to the top. Is this seriously sorting the list alphabetically?
g
Hi Matias, you'll have to update the priority field of the SC ExtMech Extensions Active records
I did read (on developers.suitecommerce site I think) that this is not recommended by NS, but this is the way I found to load extensions following certain order
you'll have to change the priority number of the extension you need to run first for a lower number than the other that will use the extension, and then activate again
m
Hello Gustavo, man, what a pain. The good thing is that the priority doesn't get overwritten which was my fear, I didn't want us to be changing that every time we are deploying.
I just did it and it worked so I guess we will continue with that and just have a single extension with the base code we need.
👍🏽 1
p
i use inline requires instead
var module=require(‘blabla’) 🤷🏻‍♂️
☝🏽 2
m
We tried doing inline requires and it didnt work either, we are doing this in the backend, we tried adding a function on the live order service controller which we are going to wrap on other extensions
p
yup it does work for me to do inline requires.