• saii
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hi ,

how to convert the UTF-8 String To Unicode  in Salesforce 

Can u please send  an Example to use in the Apex class

 

 

 

thanks in advance

 

  • March 20, 2013
  • Like
  • 0

hi

I have Written atest case for the Class of the  http request

I am getting the Following Error has 

Methods defined as TestMethod do not support Web service callouts, test skipped

and am getting the Codecoverage 100 but getting above error

How to Resolve it can u please Help me

  • March 14, 2013
  • Like
  • 0

Hi

I am Uploading the file  in the amazon s3 when am uploading the file access controller  for file is  is Private 

And when am trying to update the Acl  using the restapi am getting the error has signature does not match.

when am trying to update the Acl  iam getting the 403 error forbiiden(Signature does not match)

I am able to Fetch the acl   value byu using the Get Method .but when am trying to Put the Acl am facing this error am sending the main code can  help me

 

HttpRequest con = new HttpRequest();
con.setMethod('PUT');
con.setEndPoint('https://s3.amazonaws.com/'+BUCKET+'/'+FILENAME+'?acl');

con.setHeader('x-amz-date', HIDATE );
con.setHeader('Authorization',AUTHORIZATION);

con.setHeader('x-amz-acl', public-read);

//Response From the Amazon
Http http = new Http();
HTTPResponse res = http.send(con);

  • March 02, 2013
  • Like
  • 0

Hi,

I am sending the request to Amazon s3 to get the file to be downloaded on desktop  from s3 amazon from my bucket.

Am able to send the Request and can get the content of file when am trying to download thefile . the file is not downloading . when am sending the Http Request to s3 .Here in response am sending the content- dispostion value in response bt the file is not downloading.

//Creating the Request to amazon

 


HttpRequest con = new HttpRequest();
con.setMethod('GET');
con.setEndPoint(Endpoint);
con.setHeader('x-amz-date', HIDATE );
con.setHeader('Authorization',AUTHORIZATION);

//Response From the Amazon
Http http = new Http();
HTTPResponse res = http.send(con);
res.setHeader('Content-Type:' ,'text/plain');
res.setHeader('Content-Disposition', 'attachment; filename='+filename+''); 
string contentLength=String.valueof(res.getBodyAsBlob().size());
system.debug('ContentLength'+contentLength);
String Last= res.getHeader('Last-Modified');

 

How to use the content dispostion when we are sending the Response the File to be downloaded

 

 

 

  • February 11, 2013
  • Like
  • 0

Hi,

 

I am Making the Http request to Amazon S3 for file download  am able get content of  the File in the Debuglog and am able to display on the page but my requirement is to download file . Am using the Content Dispostion when sending the Response but does not work . how can i download file . Here am making the  Rest Request

please help  me to solve the Problem

  • February 08, 2013
  • Like
  • 0

Hi,

I am displaying the the checkbox field in the pageblocktable.

It must select only one column only .If he select another checkbox it must display an error message .

u have select the checkbox already. how to keep these validation rule in pageblocktable. in visualforce page

please help me to  solve this issue

  • January 04, 2013
  • Like
  • 0
Hi I am not able to cover the small part of code in my testcase please help me String Body= email.plainTextBody; String EmailResponseURL= 'http://'; string ParseBody= Body.substringAfter(EmailResponseURL); string[] Parseurl= ParseBody.split('\n'); system.debug('Parseurl'+Parseurl[0]); Boolean SplChar = Parseurl[0].containsAny('*'); if(SplChar == true){ Orderid=Parseurl[0].remove('*'); OrderURL=EmailResponseURL+ Orderid; } else { Orderid = Parseurl[0]; OrderURL=EmailResponseURL+ Orderid; } how to cover the If block .. please help me
  • December 26, 2012
  • Like
  • 0

Hi

I am getting the response has below when i send an http request .

am getting response has text data andin that url also .now i want to get the url from the response. only please can u help me

I am sendng an example of response

 

string response='the report has generated to sai and  and ready to access the data  ..etc.after this amgetting an url   http://www.abcadef.com/abc.asp?id=1  after these url am getting thanking you';

 

In these above response i want get only url from the response.please can u say me,

thanks in advance

 

 

  • December 21, 2012
  • Like
  • 0

Hi

I have created  On visualforcepage and it is calling thecontroller when Page excuted .and its working fine.

Now i have created a formula field hyperlink  . when i click on that hyperlink it is opening  in a new  window but now my requirement is when i click on the hyperlink should open has the Pop up Page .Please help me

 

HYPERLINK("/apex/Activity?id="+Id+"",' [Comments]').

 

 

thanks in advance

  • December 20, 2012
  • Like
  • 0

Hi

I have small doubt .I am calling the rest Request in my class.If i get the status code=200 then that  If condition will execute else an error message will be display  It is working fine,,,,,,

How to cover that part in testcase in class......please help  me


//construct an HTTP request
HttpRequest req = new HttpRequest();

req.setEndpoint('sample endpoint');
req.setMethod('POST');

//send the request
Http http = new Http();
HttpResponse res = http.send(req);

//check the response
if (res.getStatusCode() == 200)
{
insert contact;
}
else
{
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Request Fail');
ApexPages.addMessage(myMsg);
}

 

thanks in advances

 

 

  • December 04, 2012
  • Like
  • 0

Hi,

I am Trying to Open the gmail account by using the javascript without sign into the gmail.
We are Passing the username and pwd in the Url.
Am able to Rediect to another Page bt where has Password field is showing the Empty
and the username filled with my mail id what i have specfied in the Url.

<script type="text/JavaScript">
setTimeout("location.href = 'https://www.google.com/accounts/ServiceLoginAuth?continue=http://gmail.google.com/gmail&service=mail&Email=xxxxxxxxxxxxxxxx&Passwd=yyyyyyyyyy';",1500);
</script>

Here in above script am Passing the where xxxxxxxxxxxxxxxx=email id and yyyyyyyyyy=password.
I want Open My Gmail Inbox Page
but its nt working ......please help me
thanks in advances

  • November 21, 2012
  • Like
  • 0

Hi

How To close the Parentwindow by using the Javascript.I am able to open my child window but am not able to close  the Parent window onclick operation on button

Please help me to resolve my problem

  • November 09, 2012
  • Like
  • 0

Hi

I am able Open A new Window On click On the Button .but i want close the existing window  when i click on that button .but am not able to close an existing window.

I have tried window.close() but not working can u please help me

<script type="text/javascript">
function myFunction()
{

 window.open ("https://www.google.com/","mywindow","menubar=1,resizable=1,width=8000,height=9000");
 window.parent.close();    // not working
}

</script>

I have created a new tab to execute the Page . i want close my existing window

thanks in advances

  • November 09, 2012
  • Like
  • 0

Hi

I ahve been used the s3 bucket to store my file .
Am able to upload the files and download file .but now my requirement is to delete the file from the s3 bucket.

Actually i m Passing the Request using the Rest .But am getting the error has signature does not match.

Wherethat signature is working the filedownloading.Can u please help me .to delete the file from  s3.

When am Pasing the Request am getting theProblem

amPassing the Request

POLICY = 'DELETE\n\n\n'+'x-amz-date:Mon, 03 Sep 2012 18:09:49 GMT'+'\n/'+BucketName+'/'+filename;   

I ahvePassed the all the values

  • September 11, 2012
  • Like
  • 0

hi

I have Written atest case for the Class of the  http request

I am getting the Following Error has 

Methods defined as TestMethod do not support Web service callouts, test skipped

and am getting the Codecoverage 100 but getting above error

How to Resolve it can u please Help me

  • March 14, 2013
  • Like
  • 0

Hi,

 

I am Making the Http request to Amazon S3 for file download  am able get content of  the File in the Debuglog and am able to display on the page but my requirement is to download file . Am using the Content Dispostion when sending the Response but does not work . how can i download file . Here am making the  Rest Request

please help  me to solve the Problem

  • February 08, 2013
  • Like
  • 0

Hi,

I am displaying the the checkbox field in the pageblocktable.

It must select only one column only .If he select another checkbox it must display an error message .

u have select the checkbox already. how to keep these validation rule in pageblocktable. in visualforce page

please help me to  solve this issue

  • January 04, 2013
  • Like
  • 0

Hi

I am getting the response has below when i send an http request .

am getting response has text data andin that url also .now i want to get the url from the response. only please can u help me

I am sendng an example of response

 

string response='the report has generated to sai and  and ready to access the data  ..etc.after this amgetting an url   http://www.abcadef.com/abc.asp?id=1  after these url am getting thanking you';

 

In these above response i want get only url from the response.please can u say me,

thanks in advance

 

 

  • December 21, 2012
  • Like
  • 0

Hi

I have created  On visualforcepage and it is calling thecontroller when Page excuted .and its working fine.

Now i have created a formula field hyperlink  . when i click on that hyperlink it is opening  in a new  window but now my requirement is when i click on the hyperlink should open has the Pop up Page .Please help me

 

HYPERLINK("/apex/Activity?id="+Id+"",' [Comments]').

 

 

thanks in advance

  • December 20, 2012
  • Like
  • 0

Hi

I have small doubt .I am calling the rest Request in my class.If i get the status code=200 then that  If condition will execute else an error message will be display  It is working fine,,,,,,

How to cover that part in testcase in class......please help  me


//construct an HTTP request
HttpRequest req = new HttpRequest();

req.setEndpoint('sample endpoint');
req.setMethod('POST');

//send the request
Http http = new Http();
HttpResponse res = http.send(req);

//check the response
if (res.getStatusCode() == 200)
{
insert contact;
}
else
{
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Request Fail');
ApexPages.addMessage(myMsg);
}

 

thanks in advances

 

 

  • December 04, 2012
  • Like
  • 0

Hi

I am able Open A new Window On click On the Button .but i want close the existing window  when i click on that button .but am not able to close an existing window.

I have tried window.close() but not working can u please help me

<script type="text/javascript">
function myFunction()
{

 window.open ("https://www.google.com/","mywindow","menubar=1,resizable=1,width=8000,height=9000");
 window.parent.close();    // not working
}

</script>

I have created a new tab to execute the Page . i want close my existing window

thanks in advances

  • November 09, 2012
  • Like
  • 0