Skip to main content
Newcomer
July 9, 2026
Question

Show only the latest related Order number when a Quote has multiple Orders

  • July 9, 2026
  • 3 replies
  • 51 views

Hi team,

My Quote object can have multiple related Orders (child relationship). I only want to show the latest Order's OrderNumber in my Gen template — not all of them.

Is this possible, and if yes, how do I set it up?

Note: Refer to the screenshot.

Thanks!

3 replies

As75NewcomerAuthor
Newcomer
July 10, 2026

@Michael.Rave ​@mshealy could you please take a look at this? I noticed you've already answered many of the questions. If someone else can answer instead, that's fine too, I’ll keep that in mind for future questions.

Michael.Rave
Docusign Employee
Docusign Employee
July 10, 2026

@As75 

Thank you for reaching out and tagging me.

I can image two ways of realising this by handling the Salesforce data you pass to Docusign Gen rather then trying to filter it out on the Word template.

1. Custom formula field on Quote (automated)

  • Create a custom text/number field on Quote, e.g. Latest_Order_Number__c.
  • Populate it with the related Order you consider “latest” (e.g. highest CreatedDate, or most recent Status change) using:
    • A Flow (Record-Triggered Flow on Order that updates the parent Quote), or
    • A small Apex trigger / batch if you already use Apex for CPQ logic.
  • In the Gen template, use Lates_Order_Number__c instead of traversing all Orders.

2. Custom lookup field on Quote (manual)

  • Create a custom “Latest Order” lookup field on Quote
  • Manually point to the latest Order before starting the document generation.
  • Have the Gen form/section target that lookup instead of the generic Orders__r relationship.

I hope this helps!

"Select as Best" below if you find my answer is a valid solution to your issue and mark it as resolved.
Community Moderator
July 18, 2026

Hello ​@As75

I hope you are doing well! I’m checking to see if you still need assistance with this post. 

Let us know if you have any further questions. 

Have a great day ahead. 

Best Regards, 

Luke | Docusign Community Moderator