There is a master detail relationship between Opportunity and Work Order with opportunity as the master. I have created a custom list button on Work Order related list that will create new Work Order and prefill some fields from Opportunity. Requirement is such that the user must be able to change the prefilled values if needed.

I referred the following:

Release notes


By referring the example, I created the following formula:


The field is not getting prefilled on clicking the custom button on Work Order related list. I am not able to find out why. Please guide.

  • Is Shoot_Start__c the same type as Opportunity.Estimated_Start_Time__c? Meaning are they both Date/Time (or) Date data-types? Also do you have the field on the layout? Commented Jun 23, 2021 at 8:43
  • @SunilKumar Thanks for the response. The problem got solved when I recreated the button with the same formula. I don't know what the issue was. I am getting one more problem though. The custom list button on related list navigates me to a blank page with weird URL. I don't stay on the same opportunity page.
    – Koustubh
    Commented Jun 23, 2021 at 9:51
  • I used the same URL on a detail page button on Opportunity and found that it stays on the opportunity page. But the list button on Work Order related list with the same URL does not.
    – Koustubh
    Commented Jun 23, 2021 at 9:54
  • @SunilKumar I have asked another question describing the issue. Please take a look. Thank You! salesforce.stackexchange.com/questions/347652/…
    – Koustubh
    Commented Jun 23, 2021 at 10:06

1 Answer 1


Note that there should not be spaces or carriage returns in the URL. The code in question is not working because of carriage returns.

Detailed explanation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .