Create, update, and delete records from SQL Server¶
In this example, we’ll be using Skuid’s OData data source type to pull in info from a SQL Server database.
Step 1: Create a new data source¶
- Navigate to Configure > Data Sources > Data Sources.
- Click New Data Source.
- Choose OData as the data source type and name the data source.
- Click Next Step.
- Enter the URL of the service.
- Select your OData version.
- Click Save.
- Click OK.
If prompted to create a remote site setting, click OK to have Skuid create one for you (if you don’t already have one for this URL). Click Cancel to create the Remote Site Setting yourself.
Step 2: Go to the page where you want to add this model or create a new page.¶
Click Compose to view a list of all Skuid Pages, or Compose > New Page to create a new one.
Step 3: Create a New Model.¶
- Click Models.
- Click to add a new Model.
- Choose OData as the Data Source Type.
- Choose the data source you created earlier in this tutorial.
- Start typing and choose the External Object from the list.
Label your model, and choose Fields to order record by, as desired.¶
- Label your model (this is the label that will be displayed to end users).
- If you want, specify Fields to order records by.
Step 4: Choose the fields you want to show in your page.¶
- Click Fields.
- Check the fields you want to include. Best Practice: Always include the Id field.
- Use Search to aid you in your quest.
Drag and drop the fields you picked into any component you want.¶
- Just make sure that component is set to your OData model ;)
- You can also rename these fields so they look nicer. Just click on a field to rename it.
Step 5: Click Save, then click Preview to open your page in a new tab.¶
Success! You are now able to search, update, create, and delete records from your SQL Server Database right from Salesforce.¶
Notice that there’s no visual difference between this table and any other Skuid table on data from Salesforce or any other source, so you can view your data as a cohesive whole, regardless of where it comes from. Feel free to add a Title Component to this page though, to remind yourself, like I did, that “This Data comes from SQL Server!”
Troubleshooting Tips¶
- Need help with debugging? See the data troubleshooting topic.
- You can also hop over to community.skuid.com at any time to ask questions, report problems and give feedback.