is there a way to have cascading order of sourcing...
# general
j
is there a way to have cascading order of sourcing on a transaction body field? E.g. I want to auto-fill a list field based on the customer. For that to work on an invoice, I need to source from the Customer record But for that to work on a journal, I need to source from the customer (line) record. Am I looking at a suitescript (or workflow?) on the journal record? Initially I don't want to store a value on this record, so ideally a cascading order of sourcing would be best
n
that's not going to be native. what will happen if you have two or more different customers on a journal? have you tried doing this in a Transaction Saved Search and building the value in a Formula?
then displaying that as the Custom Body Field lookup
j
well the initial logic would be look up from Customer (line). If this is blank (or NULL, if there is no customer on the line), look up from Customer
The saved search mimics what I wrote above (on a saved search, I can just use the Customer/Project join and on all lines this correctly returns the customer record for the transaction, whether that customer is stored at the header level for the invoice, or the line level for the journal)
n
something like this DECODE({type},'Invoice','Header Cust field name','Journal','Line Customer field name')