Salesforce Mobile SDK and Ionic – Offline – SmartStore Query by Exact Part II

Salesforce Mobile SDK and Ionic – Offline – SmartStore Query by Exact Part II

Since we have an understanding of how to create and run a buildExactQuerySpec let’s put it to use in our contacts app. Override getContact We have talked a bit about TypeScript Inheritance and how our SmartstoreServiceProvider extends the ContactsServiceProvider so we could use the method that we already defined in the ContactsServiceProvider without implementing them and make the SmartstoreServiceProvider able to be used in […]

Salesforce Mobile SDK and Ionic – TypeScript Inheritance Part II

Salesforce Mobile SDK and Ionic – TypeScript Inheritance Part II

In Salesforce Mobile SDK and Ionic – TypeScript Inheritance we used extend to inherit from the ContactsServiceProvider in our SmartstoreServiceProvider.  This allows us to move ahead with adding features to our SmartstoreServiceProvider without having to create each necessary method call when we replace the ContactsServiceProvider.  Let’s look at how. What’s Inherited Some of the methods that we were missing: getContact and deleteContact we […]

Salesforce Mobile SDK and Ionic – TypeScript Inheritance

Salesforce Mobile SDK and Ionic – TypeScript Inheritance

Since we now know how to use the SmartStore buildExactQuerySpec how about we adapt it to our use by getting the specific contact we select on the contactsDetails view from the SmartStore instead of calling back to Salesforce.  To do that we will have to ensure that our SmartstoreServiceProvider matches the same type as our ContactsServiceProvider.  We can continue to […]

Salesforce Mobile SDK and Ionic – Offline – Update SmartStoreService

Salesforce Mobile SDK and Ionic – Offline – Update SmartStoreService

Since we are going to use the SmartstoreService as a drop in replacement for the ContactsService we will have to add in the methods that the ContactsService was providing for use.  Let’s start by adding in the loadContacts call that is used by the contacts view to list…well.. contacts. SmartStoreService.loadContacts This new loadContacts method to return a promise to conform with […]

Salesforce Mobile SDK and Ionic – Offline – SmartStore Query All Data II

Salesforce Mobile SDK and Ionic – Offline – SmartStore Query All Data II

Now that we can run a query that returns all the data let’s look at the options is has available. More QuerySpec We built our querySpec with the following line of code: var querySpec = (navigator as sdkNavigator).smartstore.buildAllQuerySpec(‘Name’, ‘decending’, 2, [‘Name’]) And it returns the following object: Results A few of the parameters are some what […]

top