cancel
Showing results for 
Search instead for 
Did you mean: 

Can you use SVMX.CURRENTRECORD to grab the value of a picklist?

Fry Chef
Fry Chef

Can you use SVMX.CURRENTRECORD to grab the value of a picklist?

Jump to solution

In the basic filter of a lookup configuration on an SFM, I'm successful filtering based on a lookup field like this:

Location - equals - value - SVMX.CURRENTRECORD.SVMXC__Site__c

But if I try to filter based on a picklist field, it breaks and I get the 'loading' cursor that lasts forever when I click on the lookup on the SFM. An example:

SomeValue - equals - value - SVMX.CURRENTRECORD.PickListField__c

Is it possible to use CURRENTRECORD with a Picklist? Or is the CURRENTRECORD literal only supposed to work with Lookup fields? Bonus if you can provide documentation

Thanks!

-Andy

1 Solution

Accepted Solutions
Retired
Retired

Re: Can you use SVMX.CURRENTRECORD to grab the value of a picklist?

Jump to solution

Andrew Gall​,

Yes, it is possible to use SVMX.CURRENTRECORD in a lookup configuration's basic filter with a picklist field. For this to work, please ensure the following:

- PickListField__c is the API Name of a field which exists in the SFM transaction's target object (header or child), and does not refer to a field in the looked up object itself. For example, if the basic filter is being defined for the Part field (Product lookup field) in Work Detail object, PickListField__c field should exist in Work Detail object.

- PickListField__c must be included in the SFM transaction's page layout.

The example used in online help section on basic filters shows SVMX.CURRENTRECORD with a date field. Same example is mentioned in the section on SFM Literals.

Regards,

Meenakshi.

View solution in original post

Highlighted
Employee
Employee

Re: Can you use SVMX.CURRENTRECORD to grab the value of a picklist?

Jump to solution

Hi Andrew,

SVMX.CURRENTRECORD.<FieldAPIName>:  This is not a picklist literal.  This literal is only available in for Lookup Pre-filter Criteria, Value Mappings, and Field Mappings.  This cannot be used to apply Mapping for “Create New Record” type SFMs. This literal is not supported for Advanced Lookup Filters, Advanced Data Validation, SFM Expressions, or Source Object Updates.

Here is some more helpful documentation on Literals.  I also uploaded this document to the documentation section here is the link: Literals and Linked Process Docs.docx

  Literals: 

  • What is a Literal?  Literals provide a way to set specific information when defining a mapping or expression. For mappings use literals when you do not have Source to Target mapping capability or when applying a static, or value, mapping instance.   Literals are also used in defining Expressions, Source Object updates, and Advanced Data Validation.
  • How is it used?  Literals are used by typing or copying/pasting them into the mapping/expression result field. In some cases, available literals may be selected from a picklist; this is usually reserved for Date Fields.
  • Supported Literals

    • Today or SVMX.TODAY:            This option is selected from a picklist.   If no picklist is available, use SVMX.TODAY
    • Tomorrow: This option is selected from a picklist.  
    • Yesterday: This option is selected from a picklist.
    • Now or SVMX.NOW: This option is selected from a picklist.   If no picklist is available, use SVMX.NOW
    • SVMX.USERTRUNK: This populates the Location or Site field. This literal should be available as a pick-list option in advanced lookup filter expressions.  At this time, advanced lookup filter expressions are the only supported area for this literal.

  • SVMX.CURRENTRECORD.<FieldAPIName>This is not a picklist literal.  This literal is only available in for Lookup Pre-filter Criteria, Value Mappings, and Field Mappings.  This cannot be used to apply Mapping for “Create New Record” type SFMs.

This literal is not supported for Advanced Lookup Filters, Advanced Data Validation, SFM Expressions, or Source Object Updates.

  • SVMX.CURRENTRECORDHEADER.<FieldAPIName>:   This is not a picklist literal.  This literal is only available in for Lookup Pre-filter Criteria, Value Mappings, and Field Mappings. This cannot be used to apply Mapping for “Create New Record” type SFMs.

This literal is not supported for Advanced Lookup Filters, Advanced Data Validation, SFM Expressions, or Source Object Updates.
Note: This is the one often used
when defining Linked Process value mappings.

  • SVMX.OWNER:  This literal is only available for use in VF Page Expressions or Updates.  Examples include Inventory or Dispatch processes.
  • SVMX.CURRENTUSER:  This literal should be generally available but is not presented as a picklist nor will it display OnLoad or before saving the transaction. 
    Note: It is important to be aware that this literal returns the Full Name of the User, not the User Id. This may result in discrepancies if there are multiple users with the same name.

Thanks,

Mike

literals​ reference documents​ supportedliterals​ sfm​ sfm mappings​ picklists​ lookupfilters​ lookupfields​ sfm transaction​sfm trasaction designer​sfm configuration​

Retired
Retired

Re: Can you use SVMX.CURRENTRECORD to grab the value of a picklist?

Jump to solution

Andrew Gall​,

Yes, it is possible to use SVMX.CURRENTRECORD in a lookup configuration's basic filter with a picklist field. For this to work, please ensure the following:

- PickListField__c is the API Name of a field which exists in the SFM transaction's target object (header or child), and does not refer to a field in the looked up object itself. For example, if the basic filter is being defined for the Part field (Product lookup field) in Work Detail object, PickListField__c field should exist in Work Detail object.

- PickListField__c must be included in the SFM transaction's page layout.

The example used in online help section on basic filters shows SVMX.CURRENTRECORD with a date field. Same example is mentioned in the section on SFM Literals.

Regards,

Meenakshi.

View solution in original post

Fry Chef
Fry Chef

Re: Can you use SVMX.CURRENTRECORD to grab the value of a picklist?

Jump to solution

Thanks Meenakshi S​,

That's exactly the way I've it setup, but it wasn't working. No time to revisit now, but if I get a chance I will see if I can get it to work and report back. Have you actually used this literal to match two Picklist fields in a basic filter before, or do you just know it's possible?

Thanks!

-Andy

0 Likes
Reply
Retired
Retired

Re: Can you use SVMX.CURRENTRECORD to grab the value of a picklist?

Jump to solution

Andrew Gall​,

Yes, I have checked and seen it working, as recently as in Spr 15 SP release. And, if the API Name of the field specified after the prefix SVMX.CURRENTRECORD. is not correct or if that field is not included in the page layout, I have seen the issue you have described (loading cursor shown forever).

Regards,

Meenakshi.

Fry Chef
Fry Chef

Re: Can you use SVMX.CURRENTRECORD to grab the value of a picklist?

Jump to solution

Great answer, thank you for the quick and thorough responses!

-Andy