0

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

Example

By referring the example, I created the following formula:

/lightning/o/WorkOrder__c/new?defaultFieldValues=
Shoot_Start__c={!Opportunity.Estimated_Start_Time__c}

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.

4
  • 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? Jun 23 '21 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
    Jun 23 '21 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
    Jun 23 '21 at 9:54
  • @SunilKumar I have asked another question describing the issue. Please take a look. Thank You! salesforce.stackexchange.com/questions/347652/…
    – Koustubh
    Jun 23 '21 at 10:06
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.