Is there a way to read rebate header input from RR logic?
Question
Is there a way to read the rebate header input from the Rebate Record logic? I added a hidden input in the header logic using raProcessor.addOrUpdateInput()
to each line item, but while processing RRs, it is always empty. Any hints?
Answer
On RR you can get RebateAgreementID, then just create select for that RA object and get that field. This example shows how to find and iterate Quotes. The same approach can be used for Rebate Agreements.
def quotesFindResult = api.find("Q", 0, 1000, "lastUpdateDate",
                                Filter.notEqual("quoteStatus", "DRAFT"),
                                //Filter.equal("uniqueName", "P-675")
                                Filter.greaterOrEqual("lastUpdateDate", lastRunTime)
                               )
/*
for (quote in quotesFindResult) {
    api.trace("quoteId", null, quote.uniqueName)
    api.trace("quoteStatus", null, quote.quoteStatus)
  
    if (quote.quoteStatus == "DEAL") {
        Library.processQuote(quote);
    }
}
Found an issue in documentation? Write to us.
Â