cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create my own stock lookup filter?

mark_taylor
Pastry Chef
Pastry Chef

How can I create my own stock lookup filter?

Hi,

I am trying to create an SFM page for reporting parts usage but need to apply a filter on the Item lookup, beyond just looking on the technician's trunk location.

I have a field on the page for the 'Consumed From Location' but cannot find a way to use that in the lookup criteria. The lookup filter only offers the options of Value and Function for the criteria so I need to either enter the field name or do I need to create my own Function? CURRENTRECORD syntax does not work.

Thanks,

mark

0 Likes
johnw
Pastry Chef
Pastry Chef

Re: How can I create my own stock lookup filter?

Mark,

Just curious as to the use of an SFM instead of using the Salesforce reporting tool?

I have several SFM search lookups for FSE trunk stock, however they only return up to 100 records so we just use reports.

0 Likes
mark_taylor
Pastry Chef
Pastry Chef

Re: How can I create my own stock lookup filter?

Hi John,

We do currently use reports that the techs have to run and copy the part from in order to enter it in the lookup. Our techs are able to consume parts from one of several locations, their own trunk location being one of them, so I want to filter the lookup based on the consumption location they select. I have created a parts consumption SFM page and want to build the lookup filter to take the value from a field where they have entered the consumption location.

I can get it to filter the trunk location but not any other location they select(even though there is product stock there).

Mark

Sent from my phone

0 Likes
johnw
Pastry Chef
Pastry Chef

Re: How can I create my own stock lookup filter?

Mark,

is this on a Mobile app or the Server side?

0 Likes
mark_taylor
Pastry Chef
Pastry Chef

Re: How can I create my own stock lookup filter?

Server side initially but plan is to then deploy to mobile.

Sent from my phone

0 Likes
johnw
Pastry Chef
Pastry Chef

Re: How can I create my own stock lookup filter?

Mark,

Not sure what your configuration is on this SFM. We have a typical Work Order where we have the parts lines and this is a Lookup field that would allow our users to select another location (if we let them). Do you have the locations mapped to the SFM? What error is kicked back?

0 Likes
mark_taylor
Pastry Chef
Pastry Chef

Re: How can I create my own stock lookup filter?

John,

I do have the intended consumption location on the SFM page but I cannot see how to use it in the lookup filter when searching for an item.

Not getting any errors, just not seeing any results from the search.

0 Likes
richard_lewis
Staff Chef
Staff Chef

Re: How can I create my own stock lookup filter?

Hi Mark, can you share some screenshots of your SFM for this please?


From reading this thread it looks like you are trying to create one record to consume a part using an SFM. You are populating one field into the create screen with the consumed from location. You are then trying to populate another field and use the value you have just added in the consumed from location field to provide you a filtered lookup of which can part to consume. 


If this is correct then this may be why you are hitting a problem. The consumed from location value that your rep has entered is not stored somewhere it can be dynamically referenced in this way until the record is saved. My understanding of the filtered lookups is that they need a value from a record that already exists to work. 


Can you also confirm which object your filtered lookup should be returning results from?

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
0 Likes
mark_taylor
Pastry Chef
Pastry Chef

Re: How can I create my own stock lookup filter?

Hi Richard,

What you describe is correct. I now think it is due to the Item field is looking up to Product and not Product Stock. I am going to change it for the SFM and then I can use the lookup context filter. I will try it out in our sandbox and will update this thread.

Thanks.

Sent from my phone

meenakshi_s
Retired
Retired

Re: How can I create my own stock lookup filter?

Assuming you need to restrict Part selected in a Work Detail record to Consumed From Location, you can try this:

Introduce a Product Stock lookup field in Work Detail object.

Include Consumed From Location and Product Stock field in the SFM page layout and mark them as Required.

Mark Part field in the page layout as Read Only.

Define lookup config for Product Stock field with the following filter:

Define Object Mapping for Product Stock lookup field as follows:

The map ProdStkToWrkDet should map Product field in Product Stock to Part field in Work Detail.

In SFM Delivery, after populating Consumed From Location value, you can select the required Product Stock and the associated Product will be auto-populated in Part field through lookup form-fill.

mark_taylor
Pastry Chef
Pastry Chef

Re: How can I create my own stock lookup filter?

Thanks Meenakshi. This is where I was heading but your suggestion improves it further.

I will try it out.

Sent from my phone

0 Likes