• SapereAude1337
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Good Afternoon everyone,

I want to use Web Server OAuth Authentication Flow, I have done all this steps:
1. crete this URl to get de code id:
https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id=3MVG9CEn_O3jvv0xJWqiGa511111rwY4GvEFzR44rfMsyb1vuI4AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&scope=refresh_token&redirect_uri=https://mail.google.com/mail/u/1/#inbox&display=popup

2. the code received was: 
https://login.salesforce.com/services/oauth2/token?grant_type=authorization_code&code=aPrxPGj_8oB..iSmfoLZNHA50FFOit.PhfWwb_qJDfvIuXFYdePtZcyHDgqJJzwHIt8gxtlcFg%3D%3D&client_id=3MVG9CEn_O3jvv0xJWqiGa5BdlH1111GvEFzR44rfMsyb1vuI4AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&client_secret=30282611111123314693&redirect_uri=https://mail.google.com/mail/u/1/#inbox

3. Create this post url:
https://login.salesforce.com/services/oauth2/token?grant_type=authorization_code&code=aPrxPGj_8oB..iSmfoLZNHA50FFOit.PhfWwb_qJDfvIuXFYdePtZcyHDgqJJzwHIt8gxtlcFg%3D%3D&client_id=3MVG9CEn_O3jvv0xJWqiGa5BdlHKrwY4GvEFzR44rfMsyb11111AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&client_secret=3028261111123314693&redirect_uri=https://mail.google.com/mail/u/1/#inbox

4. I got this Json request:
{
    "access_token": "00D6A000000v0i1!ARYAQLDVBzNOhAl3SjEkNbN5zXMsF6iQQPOqcVNXs_FIf_Qrjm2Ez42Lr6fQn5EnfPYWmNKewHwAToq0D.6apcnXUyFudTqF",
    "refresh_token": "5Aep861w1PjQhFtnoCbFAb.Tb5OnHJATNq8AGpuzXOLx5VicJ3RmIKYO.MhC9HVgKCP02qo3QHd3AF5jKjq8JgV",
    "signature": "ofNXb7vhw1uMmJ6eOJENeDaytzu/Hf/gmTq3z7FB0C8=",
    "scope": "refresh_token",
    "instance_url": "https://ioetexamples-dev-ed.my.salesforce.com",
    "id": "https://login.salesforce.com/id/00D6A000000v0i1UAA/0056A000000VKGVQA4",
    "token_type": "Bearer",
    "issued_at": "1524418764934"
}
5. I tryied to use this Get method to obtain a List of Available Objects:
https://ioetexamples-dev-ed.my.salesforce.com/services/data/v20.0/sobjects/ -H "Authorization: Bearer 00D6A000000v0i1!ARYAQLDVBzNOhAl3SjEkNbN5zXMsF6iQQPOqcVNXs_FIf_Qrjm2Ez42Lr6fQn5EnfPYWmNKewHwAToq0D.6apcnXUyFudTqF" -H "X-PrettyPrint:1"

After that I got this message:

{
        "message": "Session expired or invalid",
        "errorCode": "INVALID_SESSION_ID"
    }
What could be wrong?
Hi folks,
Wondering what I'm doing wrong here... any assistance would be great.

I've created a new Lightning Out dependency app but using the generated code...

<aura:application access="global" extends="ltng:outApp" >
<aura:dependency resource="c:MyLookupComponent" />
</aura:application>


... if I try to preview it in the browser, I get the following unhelpful error message...

This page has an error. You might just need to refresh it.
Error during init [Action failed: ltng:outApp$controller$init [Incorrect usage of ltng:outApp. Refer 'Lightning Components Developer Guide' for correct usage]]


Note: from looking in the browser's console output, the app is definitely loading... i.e. I'm seeing:

execAuraJs: 1,223.14 ms
runInitAsync: 1,234.956 ms
runAfterContextCreated: 1,261.672 ms
runAfterInitDefsReady: 1,542.987 ms
runAfterBootstrapReady: 2,110.847 ms
appCreationStart: 2,116.047 ms


Any suggestions on potential causes and/or how to troubleshoot would be great. (I get the same error in both IE and Chrome.)

Thanks!
John
 
Hi,

I want to convert a datetime field to date field in javsscript

var date=record.LastModifiedDate;

what is the method i can use to convert it

Thanks