• rao
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 7
    Replies
Getting error below error while accessign AWS S3 using Named Credentials and External credentials feature in Winter'23

System.CalloutException: We couldn't access the credential(s). You might not have the required permissions, or the external credential "AWS_Test" might not exist.

In the below code AWS_Test_Named  is the name of Named Credentials and this named credentials in linked with External credential.(AWS_Test)  As its by default Named principal identity type for AWS, I haven't added this to any permission set.  I tried adding it to permission set, still the same error.


String attachmentBody = EncodingUtil.base64Encode(lstAttachment[0].body);
                String formattedDateString = Datetime.now().formatGMT('EEE, dd MMM yyyy HH:mm:ss z');
                String filename = lstAttachment[0].name;
                //Update the content-type based on the file type being attached
                string contentType= lstAttachment[0].contentType;
                system.debug('contentType:'+contentType);
                String url = 'callout:AWS_Test_Named';
                
                 
                HttpRequest req  = new HttpRequest();
                HttpResponse res  = new HttpResponse();
                req.setMethod('PUT');
                req.setHeader('Content-Length', String.valueOf(attachmentBody.length()));
                req.setHeader('Content-Encoding', 'UTF-8');
                req.setHeader('Content-type', contentType);
                req.setHeader('Connection', 'keep-alive');
                req.setHeader('Date', formattedDateString);
                req.setHeader('ACL', 'public-read');
                req.setEndpoint(url + '/'+ filename);
                req.setBodyAsBlob(EncodingUtil.base64Decode(attachmentBody));
                
                Http http = new Http();
                res = http.send(req);
  • November 10, 2022
  • Like
  • 0
Date endDate = date.parse('4/30/2017');
Date startDate = endDate.addMonths(-1);

Start date is now coming as 3/30/2017, where as it should be 3/31/2017.  Any suggestions.
  • June 28, 2017
  • Like
  • 0
Can anybody please tell me wether we can capture signature in visualforce page.
  • April 02, 2009
  • Like
  • 0
I have a after update trigger on line item
I also have a work flow rule which will update a field value.
My problem is while inserting a line item as work flow rule updating a field value it is firing update trigger on the line itme object.
I dont want to fire update trigger on inserting.
How can I prevent this?
 
Any suggestions.
 
 
Thanks 
  • October 06, 2008
  • Like
  • 0
Can any one suggest how to remove "Change" and "Share my Calendar" links from Single User View of the SFDC Calendar.
  • August 29, 2008
  • Like
  • 0
How to use metadata API.  After referring to the WSDL in the .net web reference section.  How to authenticate it with Salesforce credentials.  and before using deploy(), where should I give the production server credentials or details.
 
any help is appreciated.
 
 
 
Thanks
 
Rao
  • August 19, 2008
  • Like
  • 0
I want to add my own logic to the existing save button functionality.  I have task like, after saving the record I want redirect to another page. 
Scenario:  When we create a contact from account page, after saving the contact we will be redirected to newly created contact screen. But I want it to redirect to contact's account screen.
 
any kind of help is appreciated.
  • August 04, 2008
  • Like
  • 0
I want to add my own logic to the existing save button functionality.  I have task like, after saving the record I want redirect to another page. 
Scenario:  When we create a contact from account page, after saving the contact we will be redirected to newly created contact screen. But I want it to redirect to contact's account screen.
 
any kind of help is appreciated.
  • July 31, 2008
  • Like
  • 0

Hi all:

  I was wondering if anyone knew how to format a number in VF so that it has a comma and decimal...

for example

40000 would be 40,000.00

So far I have this:

 

<apex:outputText value="{0}.{1}"> <apex:param value="{!SUBSTITUTE(TEXT(FLOOR(item.Unit_Price__c)), ',', '.' )}"/> <apex:param value="{!RIGHT(TEXT(ROUND((item.Unit_Price__c * 100), 2)),2)}"/> </apex:outputText>

 The second one gets the digits after the decimal. but the number shows up as 40000.00

How do I get the comma in there now...

Someone pleaseeee help with any ideas...

 

 

Hey Guys,

 

This one has just popped up on a clients org when running test classes, im frantically searching through the config to make sure no one has change something to unique but i havent found anything yet, any ideas?

 

System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>

Hi all,
 
I need some help in Visual Force datatable. Is it possible to define a datatable within another datatable. I have 4 custom objects. Projects,Propsals,Workorder and Tasks.
 
Project will have more than 1 proposal, Proposal will have more than 1 Workorder, Workorder will have more than 1 tasks.
 
I wanted to display all the above 4 details in the below format using PDF.
 
Project Name and details.
Proposal details associated to the project.
Workorder details associated to the Proposal.
Task details associated to the Workorder
 
Can anyone give some sample code of using datatable within another datatable.
 
Thanks in advance.
Hi

Can please someone tell me what options salesforce has available for PROTOCOL below?
 We currently do not have any provision for IMAP or POP connectivity to our mail servers.

this is what I found in the documentation to start using Email to case:
PROTOCOL - IMAP, but if you want to connect to SSL encrypted IMAP Servers (like e.g. GMAIL) use IMAPS and the PORT 993, may support others in the future.


Many Thanks

  • August 19, 2008
  • Like
  • 0

Hi,

 I am using the declarative approach for creating the custom Objects in force.com through Metadata API's. Am facing an unique problem, In declarative approach entire object details will be in an XML file and we need to create a "Zip" package and pass this Zip Package file as input to "Deploy()" method. creation of Zip file can be done in 2 ways,

1. by using the "WinZip" tool.

2. Programmatically by using "Java.util.Zip" package.

If the zip file is created manually using the WinZip tool and if that file is passed as input parm to "Deploy()" method then object creation is successful. if we pass in the Zip file that is created programmatically to "Deploy()" method, method returns true which indicates that operation is successful, but custom objects are not getting created on the force.com.

There is no way to check if the web service method "Deploy()" has successfully processed the request or not. Any thoughts/solutions for this problem.

 

Regards

Sara

Hi folks,

My client wants to send efax within salesforce.com's interface. I know some efax services providers. But none of them provide sales force integration. Does any one know a efax servise provides SF.com integration? does SF.com provide this service?

thanks.