public static void UpdateDatabase(USCustomizationPlugin plugin, ref List <Tuple <string, object[]> > errors) { string companyName = PXAccess.GetCompanyName(); try { //Insert UpScouts here or something } catch (Exception) { errors.Add(new Tuple <string, object[]>(USMessages.ErrorInsertingUpScouts, new object[] { companyName })); } }
public static void OnPublished(USCustomizationPlugin plugin, ref List <Tuple <string, object[]> > errors) { string companyName = PXAccess.GetCompanyName(); plugin.WriteLog(PXLocalizer.LocalizeFormatWithKey(USMessages.SomePluginRunning, typeof(USMessages).FullName, companyName)); //Select an Account that is Active PXDataRecord record = PXDatabase.SelectSingle <Account>(new PXDataFieldValue <Account.active>(PXDbType.Bit, true)); if (record == null) { errors.Add(new Tuple <string, object[]>(USMessages.NoActiveAccounts, new object[] { companyName })); } }