Salesforce Offline Record filter

In this guide, we will explain how to use the offline record filter to filter the records for offline use. If you have any questions, please email us support@formyoula.com.

If we want to filter the records available for offline use based on the value of valid API fields in Salesforce, the offline record filter option can be used.

Here are the few examples which will guide us to how a record filter syntax should look like for offline use.

Use-Case 1: Offline record filter based on merge field

(function(result){  
var Name = formyoula.form_fields["2ccf-975e-4ca9"].get('value');  
return (result.Name == Name )  
})

Use-Case 2: Offline record filter based on certain account name here it will filter all the records with the account name "test."

(function(result){  
var Name = "test";  
return (result.Name == Name )  
})

Use-Case 3: Offline record filter based on the account name, type, and other valid API fields

(function(result){ 
var AccountId = 1234567890; 
var AccountNumber = '1234567890'; 
var Active__c = true; 
var Type="Prospect" 
return (result.AccountId == AccountId && result.AccountNumber ==AccountNumber && result.Active__c == Active__c && result.Type == Type ) 
})

Use-Case 4: Offline record filter based on Email value equals to the email of the user logged into the Formyoula.

(function(result){ 
return (result.Email == window.formyoula.form_fields.Formyoula_User_Email )  
});

Similarly, we can create function for other fields. For example, to filter Email = username of the logged in user, we can use the following function

(function(result){ 
return (result.Email == window.formyoula.form_fields.Formyoula_User_Username )  
});

Here is the Json of an example form with various lookup with filters added based on the use case .

OFFLINE RECORD FILTER[GUIDE].json

Note:

For offline record filter to work correctly in offline mode,

Display Additional field option in the salesforce lookup, "Salesforce select, grid or table should have selected the API field based on which we are filtering the records. For example, if we are filtering the records based on Email = "xyz@xyz.com," then Email should be the field selected in the display additional field option, as shown in the image below.

If you have any questions, please email us support@formyoula.com.

Getting Started

  1. Create a Salesforce Form
  2. Purchasing Formyoula Licences
  3. Convert Salesforce objects to Formyoula forms
  4. Adding Users And Form Sharing
  5. Exporting All Form Entries To Excel
  6. Form Sharing
  7. Form Mass Sharing
  8. Conditional Fields
  9. Sign In To Formyoula Mobile With Partner and Communities Users
  10. Enable Salesforce Object Access for Chatter Free Users and Other Salesforce Users With Limited or No Access to Objects
  11. Create custom branded PDFs using the Formyoula PDF Editor
  12. Import Users From a CSV File
  13. Download Captured Form Entries as a CSV File
  14. Export Your Formyoula Forms From Your Sandbox and Import Them Into Your Salesforce Production Environment
  15. Create a Custom User Login Email Template for Your New Users
  16. The Difference Between Salesforce and Formyoula User Types
  17. Math Formula Field - For Simple Mathematical Calculations
  18. Custom Navigation Buttons
  19. Create Forms and Capture Form Entries in Any Language
  20. Formyoula Features
  21. How To Skip Form Pages Using Formyoula Custom Navigation?
  22. Change Salesforce Integration User By Changing Form Ownership
  23. Delete Users
  24. Restrict The Formyoula Users Page to Admin Users Only
  25. Assign Admin Privileges to Formyoula Users
  26. Edit Form Entries Directly From Your Dashboard To Resubmit Them
  27. Display Repeat Group Entries In Custom PDF Template Using Merge Fields
  28. Define dependencies between fields (e.g., dependent picklists)
  29. Formyoula Github Integration
  30. PDF Upload Form Element Guide
  31. How to Edit user Details and add Custom Attributes
  32. Installing Formyoula Mobile Web App on Windows and Mac desktop
  33. Salesforce Grid Element
  34. Graphic Element Base64 Option
  35. Auto Submit Element
  36. Salesforce Offline Record filter

Feedback and Knowledge Base