MobileCaddy Developers Forum

Welcome to the MobileCaddy Developer Forum. Here you can view and join in the discussions, submit your own questions,or send a private message if you would prefer.

Our standard support hours are 09:00 - 17:00 (GMT) with a 24 hour response (Monday-Friday). Priority support is available, please see the editions/pricing.

Images not showing after deploy

Foxy 2 years ago in Platform Emulator • updated by Todd 2 years ago 2

Seems images in my templates don't show after deploying.

They work fine if i run the application up in codeflow environment.

Can you help please?

Todd 2 years ago

Could you please confirm if the issue with the images not showing is only seen when using the Platform Emulator and/or device? If so, then the issue relates to the way that the assets are referenced, and how they are stored inside the static resource in Salesforce.

It can be overcome believe by specifying the following in your app.js

$rootScope.resourcePath = window.RESOURCE_ROOT;<em>

This should be in the .run so that you have something like this;

// existing line
.run(['$ionicPlatform', 'NetworkService', 'AppRunStatusService', 'UserService', 'SyncService' , function($ionicPlatform, NetworkService, AppRunStatusService, UserService, SyncService) {

  // new line
  $rootScope.resourcePath = window.RESOURCE_ROOT;

  // existing lines
 $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs)
Then in your template files (like _login.html_) you can ref the images with the _resourcePath_ prefix, like this;

<img style="display: block; margin-left: auto; margin-right: auto;" src="{{$root.resourcePath}}img/my-image.png" height="auto" width="100%">

The background to this is that the relative path to the images is not enough, and that the absolute path to the assets is only known following the Deploy to the platform. The above means that the absolute path can be dynamically inserted at run-time.


Modals working fine in Codeflow but not on Platform Emulator or Device

Foxy 2 years ago in Ionic Framework • updated by Todd 2 years ago 2

My app is using Ionic modals and works fine in codeflow but I get a salesforce error page when running on the platform emulator.

After debugging, the problem seems to be with this;

$ionicModal.fromTemplateUrl("templates/signature.html", {
  scope: $scope,
  animation: 'slide-in-up'

The 'modal' object doesn't contain the signature.html content but it has salesforce error page.

Any ideas, please?


Issues deploying

Dominic Myers 3 years ago in CodeFlow • updated by justin 3 years ago 2
Hi there, I had issues with deploying my adapted app from MobileCaddy Closed Beta Guide. Whenever I tried to deploy the cors-proxy server threw an error and the developer console said all sorts of scary things to do with connections being refused.

After talking with the developer I added ?scrub=full to the URI and I was asked ot login and grant access by Salesforce and everything started working again and I was allowed to deploy. Thanks to Todd!
It's worth bearing in mind that the URI needs to be:


rather than

which is what I tried to start with and which didn't work.
Searching answer

how to change the country, right now it shows US but i want to change the country

Shehan 1 year ago • updated by Todd 1 year ago 3

how to change the country, right now it shows US but i want to change the country, so please help me with this matter because its an assignment for our project. how to shoe a different country map


Lightning ready ?

Kanwal Madra 1 year ago 0

We would like to migrate to Lightning and noticed that the Lightning Readiness report identifies a few issues with MobileCaddy packaging. These issues are listed as 'buttons, links and overrides'.

Is MobileCaddy lightning ready ? Does the app create any constraints for orgs wishing to migrate to lightning ?


Error in dev console

Dylan_78 2 years ago • updated by Todd 1 year ago 1


Running up in codeflow and seeing this err in the dev console... any ideas where to start to find what the issue is?

Error caught when calling com.salesforce.smartstore:pgCloseCursor Should be exactly 1 table defn row for table: Observation__ap, but we got 0



Josh 2 years ago in Platform Emulator • updated by anonymous 1 year ago 1


I,m getting the following error after deploying to the platform and running my app through the platform emulator - this is the error I am getting in the cosole

mobilecaddy-utils.min.js:5 app.FormService loadExistingQuestionAnswersforSEFId TypeError: devUtils.getUserLocale is not a function



Londoner99 2 years ago 0


Is it possible to use CodeFlow on Windows 7?



Record Types

rocket_1990 2 years ago • updated by Todd 1 year ago 1


How do I use Record Type names rather than Record Type IDs


Todd 1 year ago

Hey @rocket_1990, MobileCaddy asllows developers to use RecordTypeName fields, instead of (or as well as Record Type IDs) with the CRUD calls using the MoblieCaddy devUtils library.

Documentation can be found on our developer website

Not a bug

Date issues - different between app and Salesforce

Foxy 2 years ago in Data Mobilsation • updated by Todd 2 years ago 3

There is an issue after we were able to sync successfully, the values getting stored in Salesforce DB are not the same as the mobile table for the dateTime fields

We seeing the below in the SFDC DB
Checked_In__c = 24/09/2016 20:00

but in the app we are seeing 25/09/2016 00:00

The latter is correct.

Todd 2 years ago

Hey Foxy,

So a couple of things to note here;

  1. the default behaviour of Salesforce is to render datetimes in the user's localtime, and also that by default JavaScript will render and collect dates (though input type=date) in the local time of the user's environment too.
  2. The dates stored in the device's local SmartStore (inc Codeflow) and in the platform are in UTC/GMT

If you want to make sure you collect a date in UTC you can use and ng-option directive in the input, like this;

<input type="date"  ng-model="myDate__c"  ng-model-options="{ timezone: 'UTC' }"/>

It is quite likely that actually the date is OK, and it's the rendering of the values that is confusing. Could you confirm your local timezone setting in Salesforce, please?