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?
...
hidden | true |
---|
...
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.
Code Block |
---|
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);
}
} |