• SF UK ADMIN FINANCE
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello Experts,

I am facing a problem with inline editing in VF page, the problem is i am not pulling information from SOBJECT rather its a mix of controller class query and Custom Settings. Isthere anyway i can use inline editing with <apex:outputtext> ?? rather than outputfield as i am not putting informiaton from object directly. Below is the snapshot of code - if you want i can post full code but any direction is useful
 
<apex:column headerValue="Address" rendered="{!$Setup.CampaignColumns__c.ADDRESS__c}">
                            <apex:outputText value="{!lpt.ADDRESS}" escape="false"/>
                        </apex:column>
                       
                        <apex:column headerValue="Email" rendered="{!$Setup.CampaignColumns__c.EMAIL__c}">
                            <apex:outputText value="{!lpt.EMAIL}" escape="false"/>
                      <apex:facet name="header">

                       <apex:commandLink action="{!sortByEmail}" Value="Email" rerender="calls"/>
</apex:facet>

                        </apex:column>
                        <apex:column value="{!lpt.PHONE}" headerValue="Phone" rendered="{!$Setup.CampaignColumns__c.PHONE__c}" />
                        
                           <!-- Added by Ankur -->
      <apex:inlineEditSupport event="ondblClick" />
                      <!--  showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" />  -->
  <!-- Until Here -->
                        <apex:column headerValue="Fax" rendered="{!$Setup.CampaignColumns__c.FAX__c}">
                            <apex:outputfield value="{!lpt.FAX}"/>
                            <!-- <apex:outputText value="{!lpt.FAX}" escape="false"/> -->
</apex:column>
                        <apex:inlineEditSupport event="ondblClick"  showOnEdit="SaveButton" hideOnEdit="massdelete" />

the code above is not working, can anyone help?

Cheers
I'm trying to setup a simple bit of code that recieves a PayPal Instant Payment Notification (IPN) finds the created Opportunity and checks a box called "paid".

The key field in Salesforce is "FormAssemblyID" 
The IPN sends a block of text that includes this parameter: &custom=https://ncoa.tfaforms.net/responses/view/52932682&

My class is supposed to extract this and use it to lookup the right opportunity and a check a box. It's either not finding the right opportunity or its not checking the Paid box when it does and can't figure out which it is.

Here is the opportunity field that it should be finding:   User-added image

And here is my code:

public class IPNHandlerController {

    public PageReference myIPNupdate() {
     try{
        PageReference pageRef = ApexPages.currentPage();
        //Get the value of the 'custom' parameter from current page
        String paramCustom = pageRef.getParameters().get('custom');
        opportunity = [select Id,paid__c from Opportunity where FormAssemblyID__c = :paramCustom ];

        String content = '';
        for(String key : pageRef.getParameters().keySet()){
            //Note that there is no guarantee of order in the parameter key map.
            content += key + ' : ' + pageRef.getParameters().get(key) + '\n';
        }
        opportunity.PayPalInfo__c = content;
        opportunity.paid__c = True;
        update opportunity;

        PageReference newPage = new ApexPages.StandardController(opportunity).view();
        newPage.setRedirect(true);        

        return newPage;
     } catch (System.Exception e){
         //A failure occurred
         system.debug(e);
         return null;
     }
    }

    public Opportunity opportunity {get; set;}

    public IPNHandlerController() {
    }
}