2017-08-05 116 views
0

我想釋放一個指定了項目但沒有項目任務的發票。Acumatica如何將ARDocumentRelease項目任務設置爲可選?

 8/5/2017 4:20:04 PM Error: 
     Error: Inserting 'GL Transaction' record raised at least one error. Please review the errors. 
     'Project Task' cannot be empty. 

     PX.Data.PXOuterException: Error: Inserting 'GL Transaction' record raised at least one error. Please review the errors. 
      at PX.Data.PXUIFieldAttribute.CommandPreparing(PXCache sender, PXCommandPreparingEventArgs e) 
      at PX.Data.PXCache.OnCommandPreparing(String name, Object row, Object value, PXDBOperation operation, Type table, FieldDescription& description) 
      at PX.Data.PXCache`1.PersistInserted(Object row) 
      at PX.Data.PXCache`1.Persist(PXDBOperation operation) 
      at PX.Data.PXGraph.Persist(Type cacheType, PXDBOperation operation) 
      at PX.Data.PXGraph.Persist() 
      at PX.Objects.GL.JournalEntry.Persist() in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\GL\JournalEntry.cs:line 1190 
      at PX.Data.PXSave`1.d__2.MoveNext() 
      at PX.Data.PXAction`1.d__31.MoveNext() 
      at PX.Data.PXAction`1.d__31.MoveNext() 
      at PX.Data.PXAction`1.PressImpl(Boolean internalCall, Boolean externalCall) 
      at PX.Data.PXAction`1.Press() 
      at PX.Objects.AR.ARReleaseProcess.ReleaseDocProc(JournalEntry je, ARRegister ardoc, List`1 pmBatchList, ARMassProcessReleaseTransactionScopeDelegate onreleasecomplete) in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\AR\ARDocumentRelease.cs:line 4673 
      at PX.Objects.AR.ARDocumentRelease.ReleaseDoc(List`1 list, Boolean isMassProcess, List`1 externalPostList, ARMassProcessDelegate onsuccess, ARMassProcessReleaseTransactionScopeDelegate onreleasecomplete) in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\AR\ARDocumentRelease.cs:line 322 
      at PX.Objects.AR.ARDocumentRelease.ReleaseDoc(List`1 list, Boolean isMassProcess, List`1 externalPostList, ARMassProcessDelegate onsuccess, ARMassProcessReleaseTransactionScopeDelegate onreleasecomplete) in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\AR\ARDocumentRelease.cs:line 351 
      at PX.Objects.AR.ARInvoiceEntry.<>c__DisplayClass31_0.b__0() in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\AR\ARInvoiceEntry.cs:line 333 
      at PX.Data.PXLongOperation.<>c__DisplayClass18_0.b__0() 

修正了,,, JournalEntry_Extension:PXGraphExtension

  protected virtual void GLTran_RowPersisting(PXCache sender, PXRowPersistingEventArgs e, PXRowPersisting del) 
      { 
       Base.ExceptionHandling.AddHandler<GLTran.taskID>((cache, args) => 
       { 
        args.Cancel = args.NewValue == null && args.Exception is PXSetPropertyException; 
       }); 


       del(sender, e); 

       if ((e.Operation & PXDBOperation.Command) == PXDBOperation.Insert || (e.Operation & PXDBOperation.Command) == PXDBOperation.Update) 
       { 
        GLTran line = (GLTran)e.Row; 
        PXDefaultAttribute.SetPersistingCheck<GLTran.taskID>(sender, e.Row, PXPersistingCheck.Nothing); 
       } 

      } 

伊夫試圖上面的代碼與ARTran替換GLTran但事件不會結合ARTran_RowPersisting在ARDocumentRelease_Extension:PXGraphExtension,什麼其他圖形控制驗證?

  8/5/2017 4:38:04 PM Error: 
     Error: Updating 'AR Transactions' record raised at least one error. Please review the errors. 
     'Project Task' cannot be empty. 

     PX.Data.PXOuterException: Error: Updating 'AR Transactions' record raised at least one error. Please review the errors. 
      at PX.Data.PXUIFieldAttribute.CommandPreparing(PXCache sender, PXCommandPreparingEventArgs e) 
      at PX.Data.PXCache.OnCommandPreparing(String name, Object row, Object value, PXDBOperation operation, Type table, FieldDescription& description) 
      at PX.Data.PXCache`1.PersistUpdated(Object row) 
      at PX.Data.PXCache`1.Persist(PXDBOperation operation) 
      at PX.Objects.AR.ARReleaseProcess.Persist() in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\AR\ARDocumentRelease.cs:line 4831 
      at PX.Objects.AR.ARReleaseProcess.ReleaseDocProc(JournalEntry je, ARRegister ardoc, List`1 pmBatchList, ARMassProcessReleaseTransactionScopeDelegate onreleasecomplete) in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\AR\ARDocumentRelease.cs:line 4784 
      at PX.Objects.AR.ARDocumentRelease.ReleaseDoc(List`1 list, Boolean isMassProcess, List`1 externalPostList, ARMassProcessDelegate onsuccess, ARMassProcessReleaseTransactionScopeDelegate onreleasecomplete) in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\AR\ARDocumentRelease.cs:line 322 
      at PX.Objects.AR.ARDocumentRelease.ReleaseDoc(List`1 list, Boolean isMassProcess, List`1 externalPostList, ARMassProcessDelegate onsuccess, ARMassProcessReleaseTransactionScopeDelegate onreleasecomplete) in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\AR\ARDocumentRelease.cs:line 351 
      at PX.Objects.AR.ARInvoiceEntry.<>c__DisplayClass31_0.b__0() in F:\Bld2\AC-FULL61U6-JOB1\sources\WebSites\Pure\PX.Objects\AR\ARInvoiceEntry.cs:line 333 
      at PX.Data.PXLongOperation.<>c__DisplayClass18_0.b__0() 

回答

1

從跟蹤ARReleaseProcess可能是您正在尋找的其他圖。它包含ARTran DAC上的ARTran_TranType_RefNbr DataView。

相關問題