Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. public with sharing class ManageReturnCX{
  2.  
  3. private ApexPages.StandardController stdCtrl;
  4. public Order_Form__c ordform {get;set;}
  5. public Order__c ordlist {get;set;}
  6.  
  7. public ManageReturnCX(ApexPages.StandardController std){
  8. stdCtrl = std;
  9. }
  10.  
  11. public void OrderPopulated(){
  12. Return__c ret = (Return__c) stdCtrl.getRecord();
  13.  
  14.  
  15. ordform = [SELECT Id, Name, Purchased_Date__c FROM Order_Form__c WHERE Id=:ret.Order_Form__c];
  16. }
  17.  
  18. }
  19.  
  20. <apex:page standardController="Return__c" extensions="ManageReturnCX" sidebar="false" showHeader="false">
  21. <apex:sectionHeader title="Return Entry"/>
  22. <apex:form >
  23. <apex:pageBlock title="Return Entry">
  24. <apex:actionRegion >
  25. <apex:pageBlockSection title="Return Header" columns="2">
  26. <apex:pageBlockSectionItem >
  27. <apex:outputLabel value="Order Name"/>
  28. <apex:outputPanel >
  29. <apex:inputField value="{!Return__c.Order_Form__c}">
  30. <apex:actionSupport event="onchange"
  31. action="{!OrderPopulated}"
  32. rerender="thePageBlock"
  33. status="status"/>
  34. </apex:inputField>
  35. <!--<apex:inputField value="{!Order_Form__c.Purchased_Date__c}"/>-->
  36. <apex:actionStatus startText="applying products..."
  37. id="status"/>
  38. </apex:outputPanel>
  39. </apex:pageBlockSectionItem>
  40. </apex:pageBlockSection>
  41. </apex:actionRegion>
  42. <apex:pageBlockSection title="Items to be Returned" columns="2" id="thePageBlock" rendered="true">
  43. <apex:pageBlockSectionItem >
  44. <apex:outputLabel value="Product Name"/>
  45. <apex:inputField value="{!ordlist.Product__c}"/>
  46. </apex:pageBlockSectionItem>
  47. </apex:pageBlockSection>
  48. </apex:pageBlock>
  49. </apex:form>
  50. </apex:page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement