• AlvaroCosta
  • NEWBIE
  • 50 Points
  • Member since 2015
  • Consultant
  • Telefônica


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 1
    Questions
  • 11
    Replies

Hello, I am having some doubts regarding Salesforce Connect and wondering if Someone know If a Custom Adapter as External Data Source can send any parameter from a salesforce record in order to consume the webservice to filter data, e.g. when an User opens an Account record Salesforce send AccountNumber to External Data Source endpoint? 
(Something like:
String url = 'https://{{URL}}/WebService/Customer/' + Account.AccountNumber;)

Or should the target webservice retrieves all records in bulk and Salesforce resolve relationship with Indirect Lookups? Is that only option?(Following the previous example: String url = 'https://{{URL}}/WebService/Customers)'; without parameters for specific records) 

I already did some searches in the documentations and help pages regarding this, but I did not find.

Hello, I am having some doubts regarding Salesforce Connect and wondering if Someone know If a Custom Adapter as External Data Source can send any parameter from a salesforce record in order to consume the webservice to filter data, e.g. when an User opens an Account record Salesforce send AccountNumber to External Data Source endpoint? 
(Something like:
String url = 'https://{{URL}}/WebService/Customer/' + Account.AccountNumber;)

Or should the target webservice retrieves all records in bulk and Salesforce resolve relationship with Indirect Lookups? Is that only option?(Following the previous example: String url = 'https://{{URL}}/WebService/Customers)'; without parameters for specific records) 

I already did some searches in the documentations and help pages regarding this, but I did not find.

Hi Everyone,

does anyone know why the $A.get("e.force:closeQuickAction").fire(); event is not working on aura component after the Winter '20 sandbox update? Or anyone experienced this issue?
I am stuck trying to obtain a token via the JWT Bearer Token Flow. I followed the steps here https://dreamevent.secure.force.com/articleView?id=remoteaccess_oauth_jwt_flow.htm&type=5

1. Created the connected app and generated a JWT Bearer Token using the sample code provided by Salesforce

2. Authorised the app via the browser successfully with a POST request like the below

https://test.salesforce.com/services/oauth2/authorize?response_type=code&client_id=3MVG9KlmwBKoC7U3w7pS2H7mWZgOv7hyIA9Tj...90JmPpk&redirect_uri=https://test.salesforce.com/services/oauth2/success

3. Now trying to execute this from Postman using the below

https://test.salesforce.com/services/oauth2/token?assertion=e...ip5reUNICJbwa_tEDErguFZuSVjv8_eaO_wM6D9cM6ycAA73YBcw&grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer

 I keep on receiving the error 
    "error": "invalid_grant",
    "error_description": "expired authorization code"

Anybody experienced this previously? I would be grateful for help on this
How the Javascript will be there in the HYPERLINK function. Please give an example for this. What is the solution for this.
Please share an example of HYPERLINK in which Javascript is used.
Thanks in advance
Hello Reader

I  have a Custom object  (called API_Order__c) which has  lookup  field to Account
My plan is  to insert  MULTIPLE  records  in 1  REST API call and I am trying to build  the good JSON
I am not able to do this. I tried  the stanbdard REST  and I tried  to  use the COmposite/tree  REST

Seee below what I havew tried:

TEST 1

I want to  create  1 record  using REST command AND I want to reference the Account with External ID.
I use the below  REST
Method: POST
URL: /services/data/v39.0/sobjects/API_Order__c/

{
  "SourceFile__c" : "DE_1A_MSV3",
  "Order_Date__c" : "2017-07-07",
  "Account__r" : 
         {
         "External_ID_vod__c":"WDEF01663170"
         },
  "Account_Name__c" : "Adler-Apotheke",
  "NumberOfExpectedItemLines__c" : "2", 
  "External_Id__c" : "API_O_1003"
}

this is WORKING

​TEST 2
BUT  if I want to insert  MULTIPLE  records  I do not  know  what is  the right syntax


[
{
  "SourceFile__c" : "Value 1",
  "Order_Date__c" : "2017-07-07",
  "Account__r" : 
         {
         "External_ID_vod__c":"XXXX"
         },
  "External_Id__c" : "API_O_1003"
},
{
  "SourceFile__c" : "Value 2",
  "Order_Date__c" : "2017-07-08",
  "Account__r" : 
         {
         "External_ID_vod__c":"YYYY"
         },
  "External_Id__c" : "API_O_1003"
}
]

I god  JSON parsng ERROR

TEST 3

I tried to use  the COMPOSITE  REST  call  to insert Multiple records and if I am passing the Salesforce ID  of  the  Account lookup is OK 

POST
/services/data/v39.0/composite/tree/API_Order__c

{
"records" :[
  {
  "attributes" : {"type" : "API_Order__c", "referenceId" : "ref1"},
  "SourceFile__c" : "DE_1A_MSV3",
  "Order_Date__c" : "2017-07-07",
  "Account__c" : "0015E000004jH2I"
  }, 
  {
  "attributes" : {"type" : "API_Order__c", "referenceId" : "ref2"},
  "SourceFile__c" : "Val2",
  "Order_Date__c" : "2017-07-07",
  "Account__c" : "0015E000004jH2I"
   }]
}

TEST 4
BUT IF  I TRY  TO REFERENC ETHE ACCOUNT WITH EXTER NAL ID  I FAIL

POST
/services/data/v39.0/composite/tree/API_Order__c

{
"records" :[
  {
  "attributes" : {"type" : "API_Order__c", "referenceId" : "ref1"},
  "SourceFile__c" : "DE_1A_MSV3",
  "Order_Date__c" : "2017-07-07",
  "Account__r" : 
         {
         "External_ID_vod__c":"WDEF01663170"
         },
  "Account_Name__c" : "Adler-Apotheke",
  "NumberOfExpectedItemLines__c" : "2", 
  "External_Id__c" : "API_O_1001"
  },
  {
  "attributes" : {"type" : "API_Order__c", "referenceId" : "ref2"},
  "SourceFile__c" : "DE_1A_MSV3",
  "Order_Date__c" : "2017-07-07",
  "Account__r" : 
         {
         "External_ID_vod__c":"WDEF01663170"
         },
  "Account_Name__c" : "Adler-Apotheke",
  "NumberOfExpectedItemLines__c" : "2",
  "External_Id__c" : "API_O_1002"
   }]
}

I have the ERROR  message: Cannot reference a foreign key field Account__r.


Any help?  

Thanks in advance Csaba
Hi All,

I have a required where i need to create Account with Contact and attachment under the contact.
I also need to refer a look up value(Test_Rec_Type_Object__c) on Account with the help of external id and the same with contact as well. On contact i have a look up(Test_Object__c) which i need to refer with the external id.

Here is the snippet which i used from workbench REST API...
----------------------
/services/data/v37.0/composite/tree/Account

{
"records" :[{
    "attributes" : {"type" : "Account", "referenceId" : "ref1"},
    "name" : "Acc with Con with Att New",
    "phone" : "1234567890",
    "website" : "www.salesforce.com",
    "numberOfEmployees" : "100",
    "industry" : "Banking",
    "Test_Rec_Type_Object__c" : {
       "Text_External_Unique__c" : "12345" },

    "Contacts" : {
      "records" : [{
         "attributes" : {"type" : "Contact", "referenceId" : "ref2"},
         "lastname" : "Smith",
         "Title" : "President",
         "email" : "sample@salesforce.com",
         "Test_Object__c" : {
            "TO_External_Obj__c.Id" : "67890" },

    "Attachments" : {
      "records" : [{
         "attributes" : {"type" : "Attachment", "referenceId" : "ref3"},
         "Name": "TestPDF.pdf", 
         "body": "Attach with Rec Creation"
         }]
      }
         }]
      }
    }]
}

Here is the error i am getting... Could any one please help on this... There is some problem in referencing the external id(Highlighted bold)

Cannot deserialize instance of reference from START_OBJECT value { or request may be missing a required field at [line:8, column:27]
 

I can't open tab or subtab for Hyperlink in formula field.

formula can do this.

 

HYPERLINK(Id,'Mr. ' &  FirstName & ' ' &  LastName, '_parent') 

 

Thank you so much.

  • July 20, 2011
  • Like
  • 0
Hi Everyone,

does anyone know why the $A.get("e.force:closeQuickAction").fire(); event is not working on aura component after the Winter '20 sandbox update? Or anyone experienced this issue?
Hi guys/gals,

Do you have any idea on how to obtain the Cloak of Adventure sweatshirt after completing 5 badges on trailheads?

Source: http://go.pardot.com/l/27572/2016-01-06/4wy4tn?utm_campaign=newyear-trailhead-sweatshirt

I haven't received any email address or notification about the completion after I had received 5 new badges on my profile. 

The sweetshirt looks really cool and I want to get it :D  Ty