Skip to content

Instantly share code, notes, and snippets.

@daichi1021
Created February 24, 2015 01:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save daichi1021/85121b1c33f1102e531c to your computer and use it in GitHub Desktop.
func createAccountRequest() -> NSURLRequest {
let instanceUrl: String = SFRestAPI.sharedInstance().coordinator.credentials.instanceUrl.description
let accessToken: String = SFRestAPI.sharedInstance().coordinator.credentials.accessToken
let authUrl: String = instanceUrl + "/secur/frontdoor.jsp?sid=" + accessToken + "&retURL="
let accountUrl: String = instanceUrl + "/apex/AccountMobile?id=" + accountItem!.salesforceId!
let request: NSURL = NSURL(string:authUrl + accountUrl)!
let urlRequest: NSURLRequest = NSURLRequest(URL: request)
return urlRequest
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment