2

I have created a new URL button on Opportunity Detail Page. This button is creating new Quote. When I click on this button, two Lookup fields values should prepopulated (Opportuity, Account) on Quote. Below is what I tried but it is not working at all

/lightning/o/SBQQ__Quote__c/new?defaultFieldValues=SBQQ__Account__c={!Opportunity.AccountId},SBQQ__Opportunity2__c={!Opportunity.Id}

SBQQ__Account__c and SBQQ__Opportunity2__c these are the lookup field on quote.

Can someone please help me what's wrong in this URL

4
  • What behavior do you see when you say: it is not working at all Commented Mar 30, 2022 at 9:01
  • URL is opening New Quote page, but Account and Opportunity Fields are not populated Commented Mar 30, 2022 at 9:17
  • What does the URL look like when you get directed to the page? Does it still contain the Ids and fields? I essentially copied your example and used it on Opportunities (and standard Quote object & opp/acc lookup fields) and it worked fine. May try to just do one field at a time to debug (first just default opp, then default only acc, then default both opp & acc). Commented Mar 30, 2022 at 11:57
  • I tried with standard Quote object and it is working for that but not for SteelBrick Quote(CPQ). Not even for one field Commented Mar 30, 2022 at 12:46

2 Answers 2

2

Issue is fixed now I was missing nooverride=true in the URL

/lightning/o/SBQQ__Quote__c/new?nooverride=true&defaultFieldValues=SBQQ__Account__c={!Opportunity.AccountId},SBQQ__Opportunity2__c={!Opportunity.Id}&recordTypeId=RECORDTYPEID
2
  • 1
    be aware that passing recordTypeId to defaultFieldValues is not supported so you may see unexpected results. Commented Mar 30, 2022 at 14:30
  • I did test this by passing RecordTypeId and it was working for me as expected Commented Mar 31, 2022 at 5:54
0

I encountered the same issue: text fields were populated, but lookup fields were not. While experimenting with the 'Insert Merge Field' feature, I discovered a solution, although I couldn't find any documentation about it. Here's what I found:

I had a custom lookup field on the Opportunity object named BillToContact__c. Its value was supposed to be retrieved and set on a new custom object, but it didn’t work.

I changed the field reference to BillToContactId__c (adding "Id" before the __c part), and it worked—even though there is no field with the API name BillToContactId__c.

1
  • 2
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. Commented Nov 20, 2024 at 12:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.