• AnjaniPrasad
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
I want to have custom email button on record page ( not based on activity or chatter related list) which should have a same behaviour what we are seeing on statndard Email button.
Anyone know how to implement this? I am fine if i need to implement via vf page or LC or LWC.


User-added image

Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.CalloutException: The callout couldn't access the endpoint. You might not have the required permissions, or the named credential "ProjectService" might not exist.
Close errors
Below simple code is running well in many orgs, but only the org it is throwing error "INVALID_SESSION_ID". What could be blocking here?

I'm executing it from Developer Console. 

//---------Code START--------
HttpRequest req = new HttpRequest();
string endpointUrl = System.URL.getSalesforceBaseURL().toExternalForm() + '/services/data/v37.0/tooling';
System.debug(endpointUrl);
req.setEndpoint(endpointUrl);
req.setHeader('Authorization', 'OAuth ' + UserInfo.getSessionID());
req.setHeader('Content-Type', 'application/json');
req.setMethod('GET');

Http httpreq = new Http();
HttpResponse res = httpreq.send(req);
System.debug('~~~~: \n' + res.getBody());
//--------Code END----------

Error Log:

02:59:53.1 (10411330)|CALLOUT_REQUEST|[22]|System.HttpRequest[Endpoint=https://finbetademoorg-dev-ed.my.salesforce.com/services/data/v37.0/tooling, Method=GET]
02:59:53.1 (33260982)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:1007
02:59:53.1 (33671612)|CALLOUT_RESPONSE|[22]|System.HttpResponse[Status=Unauthorized, StatusCode=401]
02:59:53.1 (33700285)|HEAP_ALLOCATE|[22]|Bytes:91
02:59:53.1 (33745456)|STATEMENT_EXECUTE|[23]
02:59:53.1 (33771765)|HEAP_ALLOCATE|[23]|Bytes:7
02:59:53.1 (33851753)|HEAP_ALLOCATE|[23]|Bytes:75
02:59:53.1 (33872502)|HEAP_ALLOCATE|[23]|Bytes:82
02:59:53.1 (33899640)|USER_DEBUG|[23]|DEBUG|~~~~:
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

 
 Getting error while executing retrieving medata data in local folder in Salesforce DX
sfdx force:mdapi:retrieve -s -r ./devtemp1 -u deepak.deepakenvhub2@lw.com -p 'Test Package'
I'm using managed package having two words '
User-added image
team, could you please provide/suggest any solution on that..?