How to Use Lookups in Noca Apps
How to use lookups in Noca apps
Build a searchable Salesforce lookup, end to end
A lookup lets someone search your system of record, pick a record, and push it back with the rest of the form. In this guide I build a contact form with a searchable account lookup, wire it to Salesforce as you type, and save the new contact with its account straight into Salesforce. I left integrations out of the prompt on purpose so you can see every step. Here’s how to do it.
Watch & Learn
Follow these steps to build a searchable lookup:
Steps:
1
Write your prompt
- Describe the form, here it’s a one-page form to add a contact with first name, last name, email, and a lookup to choose the account
- Leave integrations out for now so you can wire them yourself
2
Answer the design questions
- For the lookup, choose a searchable autocomplete dropdown
- Pick a visual mood, here modern SaaS, then let Noca build the app
3
Add an onType event to the account field
- Open Events on the page
- On the account field, add On Type so it searches while the user is typing
4
Read accounts from Salesforce as the user types
- In the flow, add a step with source Object, action Read, object Account
- Set a limit of 10 results and a condition where the account name equals the typed label
5
Map the results back to the lookup
- Add a component mapping node pointing at your form
- Map the lookup label and the lookup value, which is the account ID, they come as a pair
6
Go live and test the search
- Take the flow live, bind it to the app, and run a test
- Type an account name and it searches Salesforce and finds the match
7
Add a save-contact flow that creates the contact
- On the Save Contact button, create a flow that creates a Contact
- Map first name, last name, and email from the form, and map the account ID to the lookup’s selected value
8
Test it and confirm in Salesforce
- Take the save flow live, bind it, and test the app end to end
- The new contact and its account show up on the account record in Salesforce
Back to top