Access SaleOrder from StockMove in email template

Hello,

How do I access SalesOrder from StockMove in email template?

This is what I’ve found out and tried so far:

  1. In StockMove I found « origin », « originId » and « originTypeSelect » variables.

  2. I know that « origin » gives me SalesOrder.saleOrderSeq, database gives the following result:
    paveikslas

  3. I’ve tried using the following variables in email, but none of them works:
    $StockMove.origin.contactPartner.firstName$
    $StockMove.originId.contactPartner.firstName$
    $StockMove.originTypeSelect.contactPartner.firstName$

Thank you in advance.

origin and originTyprSelect are string, so can’t be reference like this.

__repo__(SaleOrder).find($StockMove.originId)

above line will fetch linked SaleOrder

1 « J'aime »

Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.