Duplicate Integration
I have customer who we built an integration for to retrieve orders and insert them into Jiwa, to marry to the external ids for debtor and inventory in the other system there are custom fields that hold the the other systems ids that are used for the lookup.
Now the customer wants to run a second copy of the same integration that points to a different end point(system/database) and would have different id's for the customers and products.
If I duplicate the plugin I can solve the system settings with code like the below but is there a way to do a similar thing with custom fields on the debtor, invetory and sales order, i.e. take into account the plulgin name in getting or setting the values so in the end the code can be the same and just fix up the descriptions on the custom fields so the user will know the difference when setting things up.
Now the customer wants to run a second copy of the same integration that points to a different end point(system/database) and would have different id's for the customers and products.
If I duplicate the plugin I can solve the system settings with code like the below but is there a way to do a similar thing with custom fields on the debtor, invetory and sales order, i.e. take into account the plulgin name in getting or setting the values so in the end the code can be the same and just fix up the descriptions on the custom fields so the user will know the difference when setting things up.
- Code: Select all
JiwaFinancials.Jiwa.JiwaApplication.Manager JiwaApplicationManager = Plugin.Manager;
System.Reflection.AssemblyName aName = new System.Reflection.AssemblyName(System.Reflection.Assembly.GetExecutingAssembly().GetName().FullName);
SettingsVault.ClientID = JiwaApplicationManager.Database.ReadSysData(aName.Name, "IClientID", "").ToString();
SettingsVault.ClientSecret = JiwaApplicationManager.Database.ReadSysData(aName.Name, "IClientSecret", "").ToString();