Can you pull in related delivery orders from sales orders from custom entity

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeffreysgrossman
    Senior Member
    • Jan 2025
    • 150

    #1

    Can you pull in related delivery orders from sales orders from custom entity

    Hello Everybody,

    I have been trying to come up with an email template that works for a custom entity we created that sits above sales orders with a one to many relationship. The sales orders show up related to the custom entity called CMultiLocationSalesOrder. However what I am not able to pull into the email template that is set to the CMultiLocationSalesOrder all the sales orders linked delivery orders.

    Click image for larger version

Name:	image.png
Views:	0
Size:	103.7 KB
ID:	123475
    However, as you see I am not relating the delivery orders related to the sales order to the cMultiLocationSalesOrder

    The code that does not work:

    HTML Code:
    <!-- {{#each deliveryOrders}} --> <!-- {{/each}} -->
    <!-- {{#each salesOrder.deliveryOrders}} --> <!-- {{/each}} -->

    If anyone has any ideas if this is possible or not I would love to hear if its possible.
  • victor
    Active Community Member
    • Aug 2022
    • 1076

    #2
    I don't think this is possible at the moment.
    It's worth creating a template for SalesOrder. And then you can add a list of related Delivery Orders to it, and also get information about CMultiLocationSalesOrder.

    Comment


    • jeffreysgrossman
      jeffreysgrossman commented
      Editing a comment
      Thank you! I will give that a try and more importantly stop trying to do it from the CMultiLocationSalesOrder. Much appreciated!
Working...