0

I wants to open iOS app using app extension from Field Service Lightning(FSL) application. Is there anyway to open the iOS app with the same session from which the FSL app is logged in(like passing OAuth token in parameter).

Basically I have a requirement to open iOS app from FSL app without login to iOS app by using the same session from which the users is logged in FSL app.

Secondly I want the of list all global token parameters(like UserName, UserId) which is possible to pass in field service lightning app extension launch value url like {!$Name}

Please find below the URL just to reference of token Parameter in FSL app extension launch value. https://help.salesforce.com/articleView?id=mfs_extension.htm&type=5

1

To clarify your question, what you want to open is an App that runs from within Salesforce Mobile using using an extension from the FSL App. What you're asking to do is supported on iOS. However, you cannot pass parameters of the type you are asking about via lightning App Extension. Per the documentation you referenced:

The Salesforce app doesn’t support parameters passed through Lightning app extensions. Therefore, when you can’t pass parameters from Field Service Lightning with a Lightning app extension to the Salesforce app.

That having been said, you can pass parameters for visualforce pages exposed as Lightning Tabs per the same documentation:

The Salesforce app can launch and accept parameters for Visualforce pages exposed as a Lightning Page Tab. However, the Lightning Page Tab name can’t have any spaces in it.

The list of tokens you are looking for can be found in the Visualforce Developer Guide under Global Variables.

I would expect your OAuth Session for FSL to also be valid for the Salesforce Mobile App since you are using the same device, provided you are still connecting to the same org and the App has been configured properly. That is the intent behind having this capability.

  • Thanks @crmprogdev for the response on the post. Basically my requirement is to build a native iOS app (which is not related to salesforce mobile app) and open that iOS native app seamlessly from FSL (By passing FSL login user session to iOS native app). – Muhammad Tahir Hassan Oct 8 '18 at 6:14
  • As per the reference to the URL:help.salesforce.com/articleView?id=mfs_extension.htm&type=5. There are two types of Tokes (parameter) that you can send from FSL app extension. The first one is the fields value that you are currently viewing. And the second type of token is specific to user information like {!User.userName} , {!User.userId}, etc(you can find the complete list of all this type of token in the link "resources.docs.salesforce.com/210/latest/en-us/sfdc/pdf/…" page number 191). – Muhammad Tahir Hassan Oct 8 '18 at 6:25
  • Is there any other way to open native iOS app from FSL application seamlessly(with the same session FSL app has). – Muhammad Tahir Hassan Oct 8 '18 at 6:26
  • The only other way I know of would be to use Backdoor.js. However, that requires a sessionId. Passing a sessionId from a mobile app to Backdoor.js is not a secure way to authenticate so I would not recommend it. OAuth is the only way to go with a mobile app. You will want to keep everything inside the same device since it has already been authenticated and use a token of some kind to pass information between them through the extension. – crmprogdev Oct 9 '18 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.