The apply process in Dynamics GP is different between the receivable and the payable modules when payable transactions are fully applied they are “automatically” moved to history which means that the data is migrated from the open tables into the history tables.
On the other hand, this is not the same behavior of the receivable module, in which fully applied documents are not moved to history at all unless a specific routine in the system which is called “Paid Transactions Removal” is run, upon which, the documents are moved from the open table to history.
Apply Reversal
Due to the different behavior of the modules illustrated above, AR transactions can be applied and un-applied at any time provided that the “paid transaction removal” process is not run. On the other hand, this is not the case in the payable module, because historical transactions cannot be un-applied using the “Apply” function, but it requires specific steps initiated by “voiding” the payment and releasing the invoices.
AR – Move History to Open ( Yes, History to Open … Reversing Apply ) – After Running Paid Transactions Removal
In certain cases, the apply processes get interrupted and result with damaged applied records, in case the records have been moved to history, then records are stuck in the history tables, but in fact, the document is not fully applied
In this essence, I have developed a procedure in order to reverse the apply process and release the sales invoices documents by moving the records fro the history status to the open status. Below is the detailed steps on how to run this procedure:
CUSTNMBR,
CPRCSTNM,
DOCNUMBR,
CHEKNMBR,
BACHNUMB,
BCHSOURC,
TRXSORCE,
RMDTYPAL,
CSHRCTYP,
CBKIDCRD,
CBKIDCSH,
CBKIDCHK,
DUEDATE,
DOCDATE,
POSTDATE,
PSTUSRID,
GLPOSTDT,
LSTEDTDT,
LSTUSRED,
ORTRXAMT,
CURTRXAM,
SLSAMNT,
COSTAMNT,
FRTAMNT,
MISCAMNT,
TAXAMNT,
COMDLRAM,
CASHAMNT,
DISTKNAM,
DISAVAMT,
DISAVTKN,
DISCRTND,
DISCDATE,
DSCDLRAM,
DSCPCTAM,
WROFAMNT,
TRXDSCRN,
CSPORNBR,
SLPRSNID,
SLSTERCD,
DINVPDOF,
PPSAMDED,
GSTDSAMT,
DELETE1,
AGNGBUKT,
VOIDSTTS,
VOIDDATE,
TAXSCHID,
CURNCYID,
PYMTRMID,
SHIPMTHD,
TRDISAMT,
SLSCHDID,
FRTSCHID,
MSCSCHID,
NOTEINDX,
Tax_Date,
APLYWITH,
SALEDATE,
CORRCTN,
SIMPLIFD,
Electronic,
ECTRX,
BKTSLSAM,
BKTFRTAM,
BKTMSCAM,
BackoutTradeDisc,
Factoring,
DIRECTDEBIT,
ADRSCODE,
EFTFLAG,
DEX_ROW_TS
CPRCSTNM,
DOCNUMBR,
CHEKNMBR,
BACHNUMB,
BCHSOURC,
TRXSORCE,
RMDTYPAL,
CSHRCTYP,
”,
”,
”,
DUEDATE,
DOCDATE,
POSTDATE,
PSTUSRID,
GLPOSTDT,
LSTEDTDT,
LSTUSRED,
ORTRXAMT,
0,
SLSAMNT,
COSTAMNT,
FRTAMNT,
MISCAMNT,
TAXAMNT,
COMDLRAM,
CASHAMNT,
DISTKNAM,
DISAVAMT,
0,
DISCRTND,
DISCDATE,
DSCDLRAM,
DSCPCTAM,
WROFAMNT,
TRXDSCRN,
CSPORNBR,
SLPRSNID,
SLSTERCD,
DINVPDOF,
PPSAMDED,
GSTDSAMT,
DELETE1,
”,
VOIDSTTS,
VOIDDATE,
TAXSCHID,
CURNCYID,
PYMTRMID,
SHIPMTHD,
TRDISAMT,
SLSCHDID,
FRTSCHID,
MSCSCHID,
NOTEINDX,
Tax_Date,
APLYWITH,
SALEDATE,
CORRCTN,
SIMPLIFD,
Electronic,
ECTRX,
BKTSLSAM,
BKTFRTAM,
BKTMSCAM,
BackoutTradeDisc,
Factoring,
DIRECTDEBIT,
ADRSCODE,
EFTFLAG,
DEX_ROW_TS
RM10601 > RM30601
BACHNUMB,
RMDTYPAL,
DOCNUMBR,
CUSTNMBR,
TAXDTLID,
TRXSORCE,
ACTINDX,
BKOUTTAX,
TAXAMNT,
ORTAXAMT,
STAXAMNT,
ORSLSTAX,
FRTTXAMT,
ORFRTTAX,
MSCTXAMT,
ORMSCTAX,
TAXDTSLS,
ORTOTSLS,
TDTTXSLS,
ORTXSLS,
POSTED,
SEQNUMBR,
CURRNIDX
RMDTYPAL,
DOCNUMBR,
CUSTNMBR,
TAXDTLID,
TRXSORCE,
ACTINDX,
0,
TAXAMNT,
ORTAXAMT,
STAXAMNT,
ORSLSTAX,
FRTTXAMT,
ORFRTTAX,
MSCTXAMT,
ORMSCTAX,
TAXDTSLS,
ORTOTSLS,
TDTTXSLS,
ORTXSLS,
POSTED,
SEQNUMBR,
CURRNIDX
–TXDTLPCTAMT
History RM10601 > RM30601
TRXSORCE,
POSTED,
POSTEDDT,
PSTGSTUS,
CHANGED,
DOCNUMBR,
DCSTATUS,
DISTTYPE,
RMDTYPAL,
SEQNUMBR,
CUSTNMBR,
DSTINDX,
DEBITAMT,
CRDTAMNT,
PROJCTID,
USERID,
CATEGUSD,
CURNCYID,
CURRNIDX,
ORCRDAMT,
ORDBTAMT,
DistRef
1,
POSTEDDT,
1,
0,
DOCNUMBR,
1,
DISTTYPE,
RMDTYPAL,
SEQNUMBR,
CUSTNMBR,
DSTINDX,
DEBITAMT,
CRDTAMNT,
PROJCTID,
USERID,
CATEGUSD,
CURNCYID,
CURRNIDX,
ORCRDAMT,
ORDBTAMT,
DistRef