public void ClearLinkToPaymentFlag(List <ComplianceDocument> complianceDocuments) { foreach (var complianceDocument in complianceDocuments) { complianceDocument.LinkToPayment = false; var complianceDocumentCache = graph.Caches <ComplianceDocument>(); complianceDocumentCache.Update(complianceDocument); complianceDocumentCache.PersistUpdated(complianceDocument); } }
public virtual APPayment CreateJointChecks(List <JointPayeePayment> jointPayeePayments) { APPayment apPayment; InvoiceJointPayeePayments = jointPayeePayments; using (var scope = new PXTransactionScope()) { ComplianceDocumentsService = new ComplianceDocumentsService(InvoiceEntry, InvoiceJointPayeePayments); apPayment = GenerateMultipleChecks(); OpenPaymentCycleWorkflow(); InvoiceEntry.Caches <ComplianceDocumentReference>().Persist(PXDBOperation.Delete); scope.Complete(); } return(apPayment); }