Acumatica如何将ARDocumentRelease项目任务设置为可选?

时间:2017-08-05 20:56:00

标签: acumatica

我正在尝试发布一个指定项目但没有项目任务的发票。

        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,但事件不会绑定到ARDocumentRelease_Extension中的ARTran_RowPersisting: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 个答案:

答案 0 :(得分:1)

从跟踪ARReleaseProcess可能是您正在寻找的另一个图表。它包含ARTran DAC上的ARTran_TranType_RefNbr DataView。