• Todd Halfpenny MC
  • NEWBIE
  • 195 Points
  • Member since 2014


  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 1
    Questions
  • 63
    Replies
How to keep user logged in all time?

Hi,

I am using Android App, in which i am using WebView to open salesforce url.
After logging in, if i close app and open it after few hours (6hr) it will ask me to login again.
How to make it logged in all time.
Dear Mobile App experts,

One of my customers would like to build a mobile App with React Native, What would be the pros and cons for the following options.
  • Option1: Can we build Mobile App in Salesforce with React Native Technology?
  • Option 2: Build React Native Mobile App outside salesforce and Integrate with Salesforce? 
  • What are the other best options to build a Mobile App?
Appreciate your valuable suggestions!
Hi All,

I have created a hybrid app using forcehybrid. I am able to login to coonected salesforce app.
Now I need to fetch data from salesforce using REST api.
I am not getting any reference in docs for hybrid app.
Can someone help me out here. Any reference or example will be very helpful. Thank you!
Hi There,

Does Salesforce Mobile SDK 6.2 or 5.3.1 for iOS support iOS 12 well?

Thanks for your help.
Hello,

I am new to SF and using the Mobile SDK. I am creating a custom mobile app using React Native and I am trying to get data from my SF instance. How do I go about finding out what data I can extract with the
net.query(soql, callback, error);
I am able to get the Contacts using:
net.query("SELECT FirstName,LastName FROM Contact"...
But I want to know what type of data I can get. Like what tables exist in my SF instance. I have a Calendar app that I have events in, but I don't know how to get events from it.

I tried:
net.query("SELECT Id FROM Calendar"

but that didn't work. Any advice would help!
 
I apologize if I have overlooked one here. This salesforce website is great but massive and I don't see a swift walkthrough, I did find this one
https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/ios_swift_intro.htm#!
and I am glad to see promise kit here but I don't have a grasp of some simple tasks I will need like

1. how do I get all of the records in the tutorial app
2. how can I sort my results 
every example I see assumed I already have a user like this:
restApi.Promises.query(soql: "SELECT Id,FirstName,LastName FROM User"
So its those sort of basic concepts I'd like to learn before I start my SalesForce project.
The tutorial that comes with forceios is written in objective C and I'm having trouble following it. 
Any help on how to get the basics of Salesforce with swift would be greatly appreciated.

Thank you!

Warren
As part of my work with MobileCaddy (http://developer.mobilecaddy,.net) I've put together a version of the MockSmartStore (https://github.com/forcedotcom/SalesforceMobileSDK-Shared/blob/master/test/MockSmartStore.js) that uses localStorage to allow data to persist between sessions during offline / out-of-container development. It seems to be working pretty well and so I was hoping to put in a pull request... before doing so though I wanted to make sure it was fully tested and up-to-scratch.

I'm hoping for some pointers on how the dev env. for working on the MobileSDK itself is set up, is it as easy as cloning, running the tools/grunt and then opening the test HTML page? And also, is there anyway to confirm that all these tests are currently passing?
I'm tearing my hair out trying to figure out why I'm not passing step 12 of the LWC Specialist superbadge. The error I'm receiving is:

"We can’t find the correct settings for navigateToRecord() in the component boatReviews controller. Make sure the component was created according to the requirements, navigating to the standard record page, based on record Id, in view mode, using the proper case-sensitivity and quotation."

My code consists of the following:
 
<a data-record-id={boatReview.CreatedBy.Id} title={boatReview.CreatedBy.Name} onclick={navigateToRecord}>{boatReview.CreatedBy.Name}</a>
 
// Helper method to use NavigationMixin to navigate to a given record on click
    navigateToRecord(event) {
      const recordId = event.target.getAttribute("data-record-id");    //have tried with and without this line
      event.preventDefault();                                          //have tried with and without this line
      event.stopPropagation();                                         //have tried with and without this line
      this[NavigationMixin.Navigate]({
          type: "standard__recordPage",
          attributes: {
              recordId: recordId,                                      //have tried directly calling event.target.getAttribute instead of referencing a variable
              actionName: "view"
          }
      });
    }

Some other things I have tried include switching between single/double quotes, exposing the method as public (thinking maybe they needed to instantiate/test it for some reason), and more. The navigation WORKS - nothing is wrong with this from a functional perspective, which is what makes this so frustrating. Any ideas?

Hi Guys !! 

I am stuck at the challenge 7, trailhead showing error of a missing function, apparently it is present in my code !! Please help !
 

import { LightningElement, track, wire, api } from 'lwc';
import getBoatsByLocation from '@salesforce/apex/BoatDataService.getBoatsByLocation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';

const LABEL_YOU_ARE_HERE = 'You are here!';
const ICON_STANDARD_USER = 'standard:user';
const ERROR_TITLE = 'Error loading Boats Near Me';
const ERROR_VARIANT = 'error';
export default class BoatsNearMe extends LightningElement {
    @api boatTypeId;
    @track mapMarkers = [];
    @track isLoading = true;
    @track isRendered = false;
    latitude;
    longitude;
    @wire(getBoatsByLocation, { latitude: '$latitude', longitude: '$longitude', boatTypeId: '$boatTypeId' })
    wiredBoatsJSON({ error, data }) {
        if (data) {
            this.createMapMarkers(data);
        } else if (error) {
            this.dispatchEvent(
                new ShowToastEvent({
                    title: ERROR_TITLE,
                    message: error.body.message,
                    variant: ERROR_VARIANT
                })
            );
            this.isLoading = false;
        }
    }
    renderedCallback() {
        if (this.isRendered == false) {
            this.getLocationFromBrowser();
        }
        this.isRendered = true;
    }
    getLocationFromBrowser() {
        navigator.geolocation.getCurrentPosition(
            (position) => {
                this.latitude = position.coords.latitude;
                this.longitude = position.coords.longitude;
            },
            (e) => {

            }, {
            enableHighAccuracy: true
        }
        );
    }
    createMapMarkers(boatData) {
        this.mapMarkers = boatData.map(rowBoat => {
            return {
                location: {
                    Latitude: rowBoat.Geolocation_Latitude_s,
                    Longitude: rowBoat.Geolocation_Longitude_s
                },
                title: rowBoat.Name,
            };
        });
        this.mapMarkers.unshift({
            location: {
                Latitude: this.latitude,
                Longitude: this.longitude
            },
            title: LABEL_YOU_ARE_HERE,
            icon: ICON_STANDARD_USER
        });
        this.isLoading = false;
    }
}


Error :

Lightning Web Component Specialist Challenge 7

I have a react native app that is connected to my Salesforce org, using the connected app. I am able to show the text fields from the salesforce. But when I try to show a image url in the react native app, it does not load. The url is a public url of a image stored in the files in SF.

Any pointers will be really helpful.
Here is the following error:
An unresolvable erorr occurred, and your changes could not be saved. Tap here to dismiss. Error: INVALID_FIELD: FeedItemId, CreatedById, Due_Date__c, FeedItem.null,CreatedBy.Name, Entitlement_Verification__c

ERROR at Row:1:Column:193 No such column 'null' on entity 'FeedItem'. If you are attempting to use a custom field, be sure to append the '__c' after the customf ield name. Please reference your WSDL or describe call for the appropriate names. 
We are developing components for a Community that will used in a mobile app via Mobile Publisher.  From what I have read, I have the impression that Lightning Web Components (vs. Aura) provides greater flexibility for mobile apps.  Please confirm.
Hi,

I am new to salesforce kindly help me out.
I am creating a hybrid remote app,
while creating, it asks to enter the start page for your app.
in the doc they have told, For start page, specify the relative URL of your Apex landing page—for example, apex/BasicVFPage.

i want to link the app to community in our org.
what will be the landing page, how to find out the landing page and its relative path.

Thank you.
Hi, Team,
I am using Salesforce SDK 4.1.1 for the Cordova android project. and I am getting an error from Salesforce smart store in android app
ERROR
"error while initializing soup: User -file is not a database: which compiling: select count(*) from sqlite_master"

Please let me know if you have any solutions or the reason why I am getting this error.

please have a look at the snapshot 

User-added image
thanks 
subhendu
How to keep user logged in all time?

Hi,

I am using Android App, in which i am using WebView to open salesforce url.
After logging in, if i close app and open it after few hours (6hr) it will ask me to login again.
How to make it logged in all time.
I have checked the Metadata Coverage (https://developer.salesforce.com/docs/metadata-coverage/46) page, and it confirms that Profile (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm) can be included in a 2GP (sfdx) managed package.

I have successfully created the new named profile in a scratch org, and used source:pull to retrieve it into the force-app\main\default\profiles\myprofilename.profile-meta.xml

However, when I create a managed package from it, and install it into an org, I do not see the Profile listed anywhere in the list of package components, nor do I see the profile available in the profiles list after installation.

Is there something I'm missing here? The other components (Apex classes, VisualForce pages, Custom Object types) are all included correctly in the package.
Dear Mobile App experts,

One of my customers would like to build a mobile App with React Native, What would be the pros and cons for the following options.
  • Option1: Can we build Mobile App in Salesforce with React Native Technology?
  • Option 2: Build React Native Mobile App outside salesforce and Integrate with Salesforce? 
  • What are the other best options to build a Mobile App?
Appreciate your valuable suggestions!
Hello Everyone,

As we all know that recently salesforce has launched Mobile publisher and builder for building mobile application for Andriod and iOS. I have been trying to explore more on this from past few days, however I am not getting proper source to buy the liscense for same as it comes with extra cost (mentioned on Salesforce sales site). Can anyone pls help me with resource, details or any sort of link ?

Thanks,
Saurabh
I have checked the Metadata Coverage (https://developer.salesforce.com/docs/metadata-coverage/46) page, and it confirms that Profile (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm) can be included in a 2GP (sfdx) managed package.

I have successfully created the new named profile in a scratch org, and used source:pull to retrieve it into the force-app\main\default\profiles\myprofilename.profile-meta.xml

However, when I create a managed package from it, and install it into an org, I do not see the Profile listed anywhere in the list of package components, nor do I see the profile available in the profiles list after installation.

Is there something I'm missing here? The other components (Apex classes, VisualForce pages, Custom Object types) are all included correctly in the package.
I have reviewed the standard Offline support available with SF1 and have found that to be too restrictive for our needs. On reading through further, I understand, building a Custom App using the Mobile SDK and using SmartStore for offline support is one of the options available. I might go Hybrid with this. I have a few questions, still:
1) Is the mobile sdk/smartstore combination the most preferred approach?
2) I have read about the data volatility associated with the SmartStore usage. Is there another option I should explore to avoid this volatility?

Thanks.
We're in the early stages of planning an app that will run on an Android phone or tablet and would like to know the best option between developing a native Android app, taking a hybrid approach or developing directly in Salesforce1.   There are 2 major considerations for picking the most suitable architecture:
  • Users of the app will be in an area with no wifi and, at best, 3G cellular data.  The cellular network in the area is also liable to go down sporadically.  For this reason, we would need a way to store data from custom objects on the Android device in offline mode until a network connection becomes available again.   Because of the network lack of speed and sporadic availability, we'd also want minimal data volume going between the app and the Salesforce server.
  • Users of the app will be technical newbies, so the user interface will need to be as simple as possible.
Any suggestions on the best approach would be greatly appreciated