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.
0
Answered
Josh 9 months ago in Platform Emulator • updated by HannahWark 6 months ago 1
0
Searching answer
Shehan 6 months ago • updated by Todd 6 months ago 3
0
Kanwal Madra 6 months ago 0
0
Answered
Dylan_78 9 months ago • updated by Todd 8 months ago 1
0
Answered
rocket_1990 9 months ago • updated by Todd 8 months ago 1
0
Londoner99 9 months ago 0
+1
Answered
Foxy 1 year ago in Platform Emulator • updated by Todd 1 year ago 2
0
Not a bug
Foxy 1 year ago in Data Mobilsation • updated by Todd 1 year ago 3
+1
Answered
Foxy 1 year ago in Ionic Framework • updated by Todd 1 year ago 2
0
Answered
Foxy 1 year ago in Platform Emulator • updated by Todd 1 year ago 1
+1
Answered
Foxy 1 year ago in Platform Emulator • updated by Todd 1 year 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?

Answer
Todd 1 year 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>
</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.


+1
Answered
Foxy 1 year ago in Ionic Framework • updated by Todd 1 year 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?

+1
Completed
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:

http://localhost:3030/www?scrub=full

rather than
http://localhost:3030/www/?scrub=full

which is what I tried to start with and which didn't work.
0
Searching answer
Shehan 6 months ago • updated by Todd 6 months 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

0
Kanwal Madra 6 months 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 ?

0
Answered
Dylan_78 9 months ago • updated by Todd 8 months ago 1

Hi,


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

0
Answered
Josh 9 months ago in Platform Emulator • updated by HannahWark 6 months ago 1

Hi,

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

0
Londoner99 9 months ago 0

Hi


Is it possible to use CodeFlow on Windows 7?


Thanks

0
Answered
rocket_1990 9 months ago • updated by Todd 8 months ago 1

Hi,


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


Thanks

Answer
Todd 8 months 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 http://developer.mobilecaddy.net/docs/developer-guide/using-record-types/

0
Not a bug
Foxy 1 year ago in Data Mobilsation • updated by Todd 1 year 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.

Answer
Todd 1 year 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?