• Manu Mahajan10
  • NEWBIE
  • 10 Points
  • Member since 2014
  • Developer
  • TCS

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 9
    Replies
I am getting (403) Forbidden error  in outbound message. My endpoint url is RequestB.in. 


Outbound Message



WF Action

As a result I am not getting a y reponse at my endpoint url:

User-added image
Hi I have the following code. If the Account Name is equal to Mukesh,error message is shown on clicking save button.But when I correct the Account Name to some other Account Name, and click second time on the record, it is not getting saved.

Class
public class AccountFieldController
{

    public Account accountNew{get;set;}
    public Id acId{get;set;} 
    public ApexPages.StandardController controllerTest;

    public AccountFieldController(ApexPages.StandardController stdcontroller)
    {
         controllerTest=stdcontroller;    
        accountNew=(Account)stdcontroller.getRecord();

    }

    public PageReference save()
    {
        if(accountNew.AnnualRevenue>1000)
        {
          accountNew.Rating='Warm' ; 
        }

        else
        {
            accountNew.Rating='Cold'; 

        }

        controllerTest.save();

        acId=controllerTest.getId();



       if(accountNew.Name=='Mukesh')
       {

           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please enter Correct Account name'));
           return null;

       }
        PageReference pr=new PageReference('/apex/fieldupdatedisplayrecord');
        pr.setRedirect(false);
        return pr;



    }



Page:

Page:FieldUpdatePage

<apex:page standardController="Account" extensions="AccountFieldController">
<apex:form id="formTest">
<apex:outputPanel id="panelTest">
<apex:outputText value="Hello Manu"/>
<apex:outputPanel id="panelTest1" rendered="{!IF(accountNew.Name=='Mukesh',false,true)}">
<apex:outputText value="Hello Manu1"/>
</apex:outputPanel>
</apex:outputPanel>
<apex:pageMessages escape="false" id="messageId"/>
<apex:pageBlock title="My Content">
<apex:pageBlockSection title="AccountInfo">
<apex:inputField value="{!accountNew.Name}"/>
<apex:inputField value="{!accountNew.Phone}"/>
<apex:inputField value="{!accountNew.AnnualRevenue}"/>
</apex:pageBlockSection>
<apex:pageBlockButtons location="bottom">
<apex:commandButton value="save" action="{!save}" reRender="messageId,panelTest"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Page to be redirected after Click on save-fieldupdatedisplayrecord

<apex:page standardController="Account" extensions="AccountFieldController" >
<apex:form >
    <apex:pageBlock title="Data Display">
        <apex:pageBlockTable value="{!accountNew}" var="item">
            <apex:column value="{!item.Name}"/>
            <apex:column value="{!item.Phone}"/>
            <apex:column value="{!item.AnnualRevenue}"/>
            <apex:column value="{!item.Rating}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:form>
</apex:page>
Hi I have created a visualforce page in which I have two select list.In one list I am fetching all the objects present in the organization.In other list based on the selected object I am fetching the fields.Now I need to get the Id of the Selected object.How can I retrieve the Id of the selected object.
I am getting (403) Forbidden error  in outbound message. My endpoint url is RequestB.in. 


Outbound Message



WF Action

As a result I am not getting a y reponse at my endpoint url:

User-added image
Hi I have the following code. If the Account Name is equal to Mukesh,error message is shown on clicking save button.But when I correct the Account Name to some other Account Name, and click second time on the record, it is not getting saved.

Class
public class AccountFieldController
{

    public Account accountNew{get;set;}
    public Id acId{get;set;} 
    public ApexPages.StandardController controllerTest;

    public AccountFieldController(ApexPages.StandardController stdcontroller)
    {
         controllerTest=stdcontroller;    
        accountNew=(Account)stdcontroller.getRecord();

    }

    public PageReference save()
    {
        if(accountNew.AnnualRevenue>1000)
        {
          accountNew.Rating='Warm' ; 
        }

        else
        {
            accountNew.Rating='Cold'; 

        }

        controllerTest.save();

        acId=controllerTest.getId();



       if(accountNew.Name=='Mukesh')
       {

           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please enter Correct Account name'));
           return null;

       }
        PageReference pr=new PageReference('/apex/fieldupdatedisplayrecord');
        pr.setRedirect(false);
        return pr;



    }



Page:

Page:FieldUpdatePage

<apex:page standardController="Account" extensions="AccountFieldController">
<apex:form id="formTest">
<apex:outputPanel id="panelTest">
<apex:outputText value="Hello Manu"/>
<apex:outputPanel id="panelTest1" rendered="{!IF(accountNew.Name=='Mukesh',false,true)}">
<apex:outputText value="Hello Manu1"/>
</apex:outputPanel>
</apex:outputPanel>
<apex:pageMessages escape="false" id="messageId"/>
<apex:pageBlock title="My Content">
<apex:pageBlockSection title="AccountInfo">
<apex:inputField value="{!accountNew.Name}"/>
<apex:inputField value="{!accountNew.Phone}"/>
<apex:inputField value="{!accountNew.AnnualRevenue}"/>
</apex:pageBlockSection>
<apex:pageBlockButtons location="bottom">
<apex:commandButton value="save" action="{!save}" reRender="messageId,panelTest"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Page to be redirected after Click on save-fieldupdatedisplayrecord

<apex:page standardController="Account" extensions="AccountFieldController" >
<apex:form >
    <apex:pageBlock title="Data Display">
        <apex:pageBlockTable value="{!accountNew}" var="item">
            <apex:column value="{!item.Name}"/>
            <apex:column value="{!item.Phone}"/>
            <apex:column value="{!item.AnnualRevenue}"/>
            <apex:column value="{!item.Rating}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:form>
</apex:page>
Hi Community,

I am doing Heroku integration workbook and I came across this issue.
When I am doing the #3 tutorial from work book I executed this command 
heroku config:add OAUTH_CLIENT_KEY=PUBLICKEY OAUTH_CLIENT_SECRET=PRIVATEKEY
The miske I made first time is I entered scret key for both private and public.
Later I realised and entered right one but no use, I am already came across the sercer side error.
https://sheltered-savannah-2269.herokuapp.com
Above URL can take you to my heroku app.
Please let me know how can I over come this. I already posted this question stackflow.

Thanks,
Suri
Hi I have created a visualforce page in which I have two select list.In one list I am fetching all the objects present in the organization.In other list based on the selected object I am fetching the fields.Now I need to get the Id of the Selected object.How can I retrieve the Id of the selected object.