You need to sign in to do that
Don't have an account?
visualforce Apex
Hi All,
1>I have a button on a standard button on Account detail page (on click javascript) .... which just passes the account external Id and account Id to an apex class and calls the method.(GETCALLOUT method )
2>Now this GETCALLOUT method makes a callout . the responsebody comes as '{}', which is basically NULLI want to show an error message/alert/popup or anything on the Account detail page.
so basically
if (response.getBody() == '{}')
{
//I need to show the error message that the account is c unavailable in the source system.
}
Please help Me. I dont want to perform a DML operation on this condition. I tried to achieve this with apex:messages but there are some restrictions I am facing..
<apex:page controller="CLASS1"
<apex:pageMessages ></apex:pageMessages>
</apex:page>
global class CLASS1{
public CLASS1(){
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'First Error Message added from apex'));
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'Second Error Message added from apex'));
// I tried with error message but the problem is I am unable to return to the constructor when I am checking the condition
public static HttpResponse GETCALLOUT ()
{
if (response.getBody() == '{}')
{
//I need to show the error message that the account is c unavailable in the source system.
}
}
}
Regards,
Siddhartha