Skip to content

LWC for searching thru Salesforce records w/ ability to set sObject and fields via the builder πŸ› 

Notifications You must be signed in to change notification settings

jsmithdev/rummage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rummage πŸ’

Salesforce LWC for searching thru records by setting sObject and fields as attributes via parent component or the App or Community builders πŸ› 

Screenie of rummage-view containing rummage-bar and reactive-table

demo

Builder view

builder

Limits

This uses SOQL's LIKE operator to preform searches via the accompanying Rummage Apex class

In SOQL, the LIKE operator supports string fields only which is stated in the docs here

String data types include Text, Phone, Picklist, URL, etc.

If you need to search other data types, creating a text based formula field may help

Formula Example 1: TEXT( Expiration_Date__c )

Formula Example 2: Primary_Contact__r.FirstName +' '+ Primary_Contact__r.LastName

Deploy

Covert with SFDX; This creates a folder called deploy

sfdx force:source:convert -r force-app -d deploy

Now you can deploy from the resulting deploy directory

πŸ“Œ Below deploys to the default org set; Add -u [email protected] or -u alias to deploy else where

sfdx force:mdapi:deploy -d deploy -w -1  -l RunSpecifiedTests -r RummageTest --verbose

Results should more or less mirror below

Deployment finished in 121000ms

=== Result
Status:  Succeeded
jobid:  0Af3b000003ZSudCAG
Completed:  2019-05-17T14:39:25.000Z
Component errors:  0
Components deployed:  5
Components total:  5
Tests errors:  0
Tests completed:  1
Tests total:  1
Check only: false

=== Test Success [1]
NAME         METHOD
───────────  ──────
RummageTest  search

=== Apex Code Coverage
NAME     % COVERED  UNCOVERED LINES
───────  ─────────  ───────────────
Rummage  92%        19

Total Test Time:  158.0

=== Components Deployed [5]
TYPE                      FILE                            NAME           ID
────────────────────────  ──────────────────────────────  ─────────────  ──────────────────
                          deploy/package.xml              package.xml
ApexClass                 deploy/classes/Rummage.cls      Rummage        01p3b000000JeCWAA0
ApexClass                 deploy/classes/RummageTest.cls  RummageTest    01p3b000000JeCXAA0
LightningComponentBundle  deploy/lwc/reactiveTable        reactiveTable  0Rb3b0000004C9NCAU
LightningComponentBundle  deploy/lwc/rummageBar           rummageBar     0Rb3b0000004C9OCAU
LightningComponentBundle  deploy/lwc/rummageView          rummageView    0Rb3b0000004C9PCAU

Coded with πŸ’ by Jamie Smith

About

LWC for searching thru Salesforce records w/ ability to set sObject and fields via the builder πŸ› 

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published