Update purchase header "posting description" with the line first line similar to the G/L entry
As you state correctly in your question: this is a HEADER function.
In the header, things are rather straightforward: initialise the Psting Description to DocType + RecNo, allow the user to chage it afterwards. End of story. Simple.
If your requirement is to have the description of the first purchase line in the posting description, you will encouter a lot of issues along the way:
- what if the first line gets deleted? Another line will become the first line and you will need to handle that
- what if the Get ReceiptLines() function is called: in that case your first line will be a textline referring to a the first receipt on the invoice.
- what if the first line is just a comment, and not a 'real' line: bottomline question: what do you consisder to be the first line?
The only workable solution in my opinion is to determine the 'first line' in the Release() or Request Approval(depening on your setup) events.
That of course will override the manual input the user has given.
so I leave you with 2 questions:
- what do you call the first line
- how much work do you want to spend on coding the housekeeping for this?