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.
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.
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).
Sent from my phone
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?
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.
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?
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.
Sent from my phone
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.