GithubHelp home page GithubHelp logo

sosl_flow_component's Introduction

sosl_flow_component

This is a basic SOSL apex invokable class, made primarily for use in flows. It was developed for use with DatatableFSC, but can be used in any flow where a collection should be returned from a search. The benefit of using this approach is that you take advantage of Salesforce's fuzzy logic in search, where you can miss leading or trailing letters, or use close names, e.g. a search for Davi or Dave will return David.

Getting Started

You can install the package from these links:

Production

Sandbox

What It Does

The invokable class takes a set of variable, and returns a collection of records found during the search.

First, collect the queries. You can use a single query, or a list. In the example below, I'm looking for contacts with a name, email or phone number.

Query Collection

If you're using more than one query, you'll need to add them to a list. This is done by setting up a text type collection variable:

Variable

Then you need to assign each query to that list. In the example below I'm checking whether the query had a value before I add it, so I don't add an empty string:

Flow

Assignment

Then I pass that list into the invokable action, along with the SObject type, and a scope or where clause if required. The process returns a list of ID's, which I store in another text collection variable:

Invokation

If I need more than the ID, I iterate through the results, adding the records to a record collection variable:

RecordLoop

Then I present it in a datatable, following the instructions in the DatatableFSC documentation.

result

From there, I can select a record, edit inline, or take other actions.

License

This project is licensed under the GNU GPLv3 License - see the LICENSE.md file for details

Acknowledgments

sosl_flow_component's People

Contributors

davidsmithnz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

sosl_flow_component's Issues

Apex Error

Hi @DavidSmithnz , first off, I apologize if this is not the right place to get some help with this component. Let me know if there's a better place to seek assistance. Thanks so much for making this component available. I've been testing this apex action and am getting this error:
An Apex error occurred: System.QueryException: line 1:11 mismatched character '&' expecting '}'

I've tried to narrow down where the error lies but have been unable. Is this an issue in the apex or in the values I assigned to the component?

Screen Shot 2021-12-10 at 11 10 46

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.