Labels
Reply
Frequent Contributor
Posts: 163
Registered: ‎03-24-2016
Accepted Solution

Ability to Add Asset Lookup Field to Quote Line & Line Editor that Filters Based on Account

Hi All,

 

I have a challenging question for the community. I am trying to add an asset lookup field to the quote line to allow the user to select the asset the quote line is going to relate to. The asset that is going to be selected will already exist and be associated with the customer account. I want the user to be able to click in the asset lookup field on the quote line and be presented with a filtered list of the assets which are associated with the account/opportuniity that the quote relates to.

 

The challenge I am having is with regard to the field data types that can be used for filtering a lookup field. Formula field may not be used for filtering so a creative workaround is needed. I can select the Account ID on the asset object but cannot find a viable field to compare the Account ID to for filtering purposes because of the data types allowed to be used when filtering a lookup field. Not sure if anyone has solutioned for this. The use case is to allow a CSR to create a quote, add a service product to the quote, and associate an asset to the service product on a single quote line that can be utilized for the generation of an entitlement. 

 

Dan

Community Manager
Posts: 499
Registered: ‎09-10-2015

Re: Ability to Add Asset Lookup Field to Quote Line & Line Editor that Filters Based on Account

you pre-populate account ID on creation of the quote lines.  I think that is the issue you are having.  Go to setup > develop > custom setting > manange field matadata and create a new record to have the ID populated on creation 

 

then you just create the lookup to point to the asset object with a filter that has the Account account ID equal the Account ID on the quote.  

 

 

Frequent Contributor
Posts: 163
Registered: ‎03-24-2016

Re: Ability to Add Asset Lookup Field to Quote Line & Line Editor that Filters Based on Account

Hi David,

 

Can you please provide detailed instructions on the process of creating the metadata field and what the end result is?

 

I really appreciate your help with this.

 

Dan

Community Manager
Posts: 499
Registered: ‎09-10-2015

Re: Ability to Add Asset Lookup Field to Quote Line & Line Editor that Filters Based on Account

When creating field metadata, you go to Setup > Develop > Custom Settings, then click manage next to field Metadata. There, click new. In the Name field, you put in the ID of the field that you're looking to populate on the new quote. For example, if you want to populate the Partner field upon clicking new quote, you would then go to Setup > Create > Objects > Quote, click the Partner field, and copy the ID from the URL into the "Name" field.

In the "Field Name" field, you would put the API name of the field. So for partner, you would put SBQQ__Partner__c.

In the "Object Name" field, you would put the API name of the object, or in this case, SBQQ__Quote__c.

Highlighted
Occasional Contributor
Posts: 10
Registered: ‎04-19-2017

Re: Ability to Add Asset Lookup Field to Quote Line & Line Editor that Filters Based on Account

Has anyone been able to get this working?  I have a field for Asset (a lookup field) on the Quote Line.  I have tried to prepopulate the Account ID on the Asset and on the Quote Line via a custom field (i.e. AccountID) and then also tried to have a workflow populate it.  I can now see the Account ID on either object.  HOWEVER, when I create the Lookup Filter criteria, I can't seem to find anyone to connect the logic.  I have tried Asset: Account_ID EQUALS Quote Line: Account ID but when I go to the Quote Line and click on the search for Asset I still get the entire list of all system assets instead of a filtered search of assets for only that account.

 

Any help here would be greatly appreciated.