My customize working properly but when using acumatica software for more than a week. the customize stop working. When I restart IIS Server, It’s working again. I think the problem is not my customize. Do you have any solution on that ?
My customize working properly but when using acumatica software for more than a week. the customize stop working
Only this block code:
// Acuminator disable once PX1008 LongOperationDelegateSynchronousExecution [Justification]
// Acuminator disable once PX1013 PXActionHandlerInvalidReturnType [Justification]
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Activate", MapEnableRights = PXCacheRights.Delete, MapViewRights = PXCacheRights.Delete)]
protected void Activate() => PXLongOperation.StartOperation((PXGraph) this, (PXToggleAsyncDelegate) (() =>
{
BOQ current = this.boqView.Current;
if (current != null && current.Status == "V")
{
int? nullable = current.UnBillAccount;
// Acuminator disable once PX1050 HardcodedStringInLocalizationMethod [Justification]
nullable = nullable.HasValue ? current.UnEarnAccount : throw new PXSetPropertyException("Invalid UnBillAccount", PXErrorLevel.Error);
// Acuminator disable once PX1050 HardcodedStringInLocalizationMethod [Justification]
nullable = nullable.HasValue ? current.RevenueAccount : throw new PXSetPropertyException("Invalid UnEarnAccount", PXErrorLevel.Error);
// Acuminator disable once PX1050 HardcodedStringInLocalizationMethod [Justification]
nullable = nullable.HasValue ? current.COGSAccount : throw new PXSetPropertyException("Invalid RevenueAccount", PXErrorLevel.Error);
// Acuminator disable once PX1050 HardcodedStringInLocalizationMethod [Justification]
nullable = nullable.HasValue ? current.WIPAccount : throw new PXSetPropertyException("Invalid COGSAccount", PXErrorLevel.Error);
// Acuminator disable once PX1050 HardcodedStringInLocalizationMethod [Justification]
nullable = nullable.HasValue ? current.ContraAccount : throw new PXSetPropertyException("Invalid WIPAccount", PXErrorLevel.Error);
if (!nullable.HasValue)
// Acuminator disable once PX1050 HardcodedStringInLocalizationMethod [Justification]
throw new PXSetPropertyException("Invalid ContraAccount", PXErrorLevel.Error);
}
if (!this.boqView.Current.Released.Value)
{
try
{
ReasonCodeMaint instance = PXGraph.CreateInstance<ReasonCodeMaint>();
instance.reasoncode.Insert();
instance.reasoncode.Current.ReasonCodeID = this.boqView.Current.BOQCode + "I";
instance.reasoncode.Current.Descr = "Issue on " + this.boqView.Current.Descr;
instance.reasoncode.Current.Usage = "I";
instance.reasoncode.Current.AccountID = this.boqView.Current.WIPAccount;
instance.reasoncode.Current.SubID = this.boqView.Current.SubID;
instance.Save.Press();
ReasonCodeExt extension = PXCache<ReasonCode>.GetExtension<ReasonCodeExt>(instance.reasoncode.Current);
extension.UsrIsBOQ = new bool?(true);
extension.UsrIsActive = new bool?(true);
extension.UsrDescrBOQ = this.boqView.Current.Descr;
extension.UsrSubTaskID = this.boqView.Current.BOQCode;
instance.reasoncode.Update(instance.reasoncode.Current);
instance.Actions.PressSave();
}
catch (Exception ex)
{
}
try
{
ReasonCodeMaint instance = PXGraph.CreateInstance<ReasonCodeMaint>();
instance.reasoncode.Insert();
instance.reasoncode.Current.ReasonCodeID = this.boqView.Current.BOQCode + "A";
instance.reasoncode.Current.Descr = "adjust on " + this.boqView.Current.Descr;
instance.reasoncode.Current.Usage = "A";
instance.reasoncode.Current.AccountID = this.boqView.Current.WIPAccount;
instance.reasoncode.Current.SubID = this.boqView.Current.SubID;
instance.Save.Press();
ReasonCodeExt extension = PXCache<ReasonCode>.GetExtension<ReasonCodeExt>(instance.reasoncode.Current);
extension.UsrIsBOQ = new bool?(true);
extension.UsrIsActive = new bool?(true);
extension.UsrDescrBOQ = this.boqView.Current.Descr;
extension.UsrSubTaskID = this.boqView.Current.BOQCode;
instance.reasoncode.Update(instance.reasoncode.Current);
instance.Actions.PressSave();
}
catch (Exception ex)
{
}
}
this.boqView.Current.Status = "A";
this.boqView.Current.IsValidated = new bool?(false);
this.boqView.Current.ValidatedCount = new Decimal?(0M);
this.boqView.Current.Released = new bool?(true);
this.boqView.Cache.Update((object) this.boqView.Current);
this.Save.Press();
}));
and Please share the details requested above like in which screen you have written this code and what is expected results.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.