-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
3Questions
-
4Replies
"An internal server error has occurred" when rendered as pdf
We are trying to render build specifications based on sales order data. Various data elements need to be pulled in and related to output the necessary content. The Visual Force page leverages the standard controller for the SalesOrder custom object, and uses an extension controller to pull together all the relevant related records.
Problem: When this page is rendered as HTML, the page displays as expected. However, if the page is rendered as PDF, a generic error message appears:
An internal server error has occurred |
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. Thank you again for your patience and assistance. And thanks for using Salesforce! Error ID: 938602852-1015 (-236663650) |
How can we get more information about the source of the issue that causes this error? Better yet, what is the cause of the problem?
The related code is attached below:
Main VS Page:
<apex:page standardController="kaz_salesorder__c" extensions="extSalesOrderPrint" showHeader="false" renderAs="pdf"> <html> <head> <style type="text/css" media="print"> .PB { page-break-inside: avoid; page-break-after: always; height: 100%; width: 100%; border: solid 0px #000000; } .PBAVOID, .PBAVOID div, .PBAVOID table{ page-break-inside: avoid;} body { margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif; } @page { size: portrait; } </style> <style type="text/css" media="screen,print"> body, td, span, div { font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif; font-size: 11px;} .OUTLINE_DARK, .OUTLINE_MEDIUM, .OUTLINE_LIGHT { border: solid 1px #000000; padding: 5px; } .OUTLINE_DARK { background-color: #CCCCCC; } .OUTLINE_MEDIUM { background-color: #EEEEEE; } .OUTLINE_LIGHT { background-color: none; } .LABEL_BOLD { font-weight: bold; font-size: 12px;} .LABEL_LARGE { font-weight: bold; font-size:16px; } .LABEL_HEADING { font-weight: bold; font-size:22px; } td.BOMChecklist, th.BOMChecklist { border-bottom: 1px solid #000000;border-right: 1px solid #000000;} table.BOMChecklist { border-top: 1px solid #000000;border-left: 1px solid #000000;} table.BOMChecklist th, th.BOMChecklist{ Background-Color: #eeeeee; font-size: 14; } table.ProductList td, table.ProductList th { border-bottom: 1px solid #000000;border-right: 1px solid #000000;} table.ProductList th { Background-color: #eeeeee; font-size: 14; text-align: right;} table.ProductList { border-top: 1px solid #000000;border-left: 1px solid #000000;} table.AvoidBorder td, table.AvoidBorder th { border-bottom: 0px solid #000000;border-right: 0px solid #000000;} </style> </head> <body> <apex:variable var="itemIndex" value="{!0}" /> <apex:outputPanel rendered="{!(HwBaseItems.size>0)}" layout="none" id="hw"> <apex:repeat value="{!HwBaseItems.items}" var="li" id="HwLineItems"> <apex:repeat value="{!li.assets}" var="ia" id="ItemAssets"> <apex:variable var="itemIndex" value="{!(itemIndex+1)}" /> <div class="PB"> <c:BuildSheetHeader so="{!kaz_salesorder__c}" /> <br /> <apex:variable var="FeatureLicensesCombined" value="{!IF(ISNULL(li.item.Product__r.Addon_Licenses__c),'',li.item.Product__r.Addon_Licenses__c)}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAssets2"><apex:variable var="FeatureLicensesCombined" value="{!IF(FeatureLicensesCombined='','',FeatureLicensesCombined&' ')&IF(ISNULL(ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c),'',ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c)}" /></apex:repeat> <c:BuildSheetItemDetails ProductCategory="Appliance" ProductItemIndex="{!Text(itemIndex/1)}" ProductCode="{!li.item.ProductCode__c}" ItemName="{!ia.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ia.duration}" ProductName="{!li.item.ProductName__c}" BaseLicense="{!li.item.Product__r.Base_License__c}" FeatureLicense="{!FeatureLicensesCombined}"/> <br /> <c:BillOfMaterialChecklist bom="{!li.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> <apex:variable var="itemSubIndex" value="{!0}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAddonAssets"> <apex:variable var="itemSubIndex" value="{!(itemSubIndex+1)}" /> <br /> <c:BuildSheetItemDetails ProductCategory="Installed Add-on Item" ProductItemIndex="{!TEXT(itemIndex/1)&'.'&TEXT(itemSubIndex/1)}" ProductCode="{!ra.itemAsset.Sales_Order_Item__r.Product__r.ProductCode}" ItemName="{!ra.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ra.duration}" ProductName="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Name}" BaseLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Base_License__c}" FeatureLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c}"/> <br /> <c:BillOfMaterialChecklist bom="{!ra.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> </apex:repeat> </div> </apex:repeat> </apex:repeat> </apex:outputPanel> <apex:outputPanel rendered="{!(SwBaseItems.size>0)}" layout="none" id="sw"> <apex:repeat value="{!SwBaseItems.items}" var="li" id="SwLineItems"> <apex:repeat value="{!li.assets}" var="ia" id="ItemAssets"> <apex:variable var="itemIndex" value="{!(itemIndex+1)}" /> <div class="PB"> <c:BuildSheetHeader so="{!kaz_salesorder__c}" /> <br /> <apex:variable var="FeatureLicensesCombined" value="{!IF(ISNULL(li.item.Product__r.Addon_Licenses__c),'',li.item.Product__r.Addon_Licenses__c)}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAssets2"><apex:variable var="FeatureLicensesCombined" value="{!IF(FeatureLicensesCombined='','',FeatureLicensesCombined&' ')&IF(ISNULL(ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c),'',ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c)}" /></apex:repeat> <c:BuildSheetItemDetails ProductCategory="Software Only" ProductItemIndex="{!Text(itemIndex/1)}" ProductCode="{!li.item.ProductCode__c}" ItemName="{!ia.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ia.duration}" ProductName="{!li.item.ProductName__c}" BaseLicense="{!li.item.Product__r.Base_License__c}" FeatureLicense="{!FeatureLicensesCombined}"/> <br /> <c:BillOfMaterialChecklist bom="{!li.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> <apex:variable var="itemSubIndex" value="{!0}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAddonAssets"> <apex:variable var="itemSubIndex" value="{!(itemSubIndex+1)}" /> <br /> <c:BuildSheetItemDetails ProductCategory="Installed Add-on Item" ProductItemIndex="{!TEXT(itemIndex/1)&'.'&TEXT(itemSubIndex/1)}" ProductCode="{!ra.itemAsset.Sales_Order_Item__r.Product__r.ProductCode}" ItemName="{!ra.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ra.duration}" ProductName="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Name}" BaseLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Base_License__c}" FeatureLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c}"/> <br /> <c:BillOfMaterialChecklist bom="{!ra.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> </apex:repeat> </div> </apex:repeat> </apex:repeat> </apex:outputPanel> <apex:outputPanel rendered="{!(AddonItems.size>0)}" layout="none" id="addon"> <apex:repeat value="{!AddonItems.items}" var="li" id="AssonLineItems"> <apex:repeat value="{!li.assets}" var="ia" id="ItemAssets"> <apex:outputPanel rendered="{!NOT(ia.HasParent)}" layout="none" id="addon"> <apex:variable var="itemIndex" value="{!(itemIndex+1)}" /> <div class="PB"> <c:BuildSheetHeader so="{!kaz_salesorder__c}" /> <br /> <apex:variable var="FeatureLicensesCombined" value="{!IF(ISNULL(li.item.Product__r.Addon_Licenses__c),'',li.item.Product__r.Addon_Licenses__c)}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAssets2"><apex:variable var="FeatureLicensesCombined" value="{!IF(FeatureLicensesCombined='','',FeatureLicensesCombined&' ')&IF(ISNULL(ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c),'',ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c)}" /></apex:repeat> <c:BuildSheetItemDetails ProductCategory="Add-on Item" ProductItemIndex="{!Text(itemIndex/1)}" ProductCode="{!li.item.ProductCode__c}" ItemName="{!ia.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ia.duration}" ProductName="{!li.item.ProductName__c}" BaseLicense="{!li.item.Product__r.Base_License__c}" FeatureLicense="{!FeatureLicensesCombined}"/> <br /> <c:BillOfMaterialChecklist bom="{!li.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> <apex:variable var="itemSubIndex" value="{!0}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAddonAssets"> <apex:variable var="itemSubIndex" value="{!(itemSubIndex+1)}" /> <br /> <c:BuildSheetItemDetails ProductCategory="Installed Add-on Item" ProductItemIndex="{!TEXT(itemIndex/1)&'.'&TEXT(itemSubIndex/1)}" ProductCode="{!ra.itemAsset.Sales_Order_Item__r.Product__r.ProductCode}" ItemName="{!ra.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ra.duration}" ProductName="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Name}" BaseLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Base_License__c}" FeatureLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c}"/> <br /> <c:BillOfMaterialChecklist bom="{!ra.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> </apex:repeat> </div> </apex:outputPanel> </apex:repeat> </apex:repeat> </apex:outputPanel> </body> </html> </apex:page>
BuildSheetHeader code:
<apex:component > <apex:attribute name="so" description="Items reflects the Sales Order object" type="kaz_salesorder__c" required="true"/> <div class="OUTLINE_DARK"> <table width="100%"> <tr> <td width="0%"><img src="{!$Resource.TrainingCertificate}/kazeon_logo_hd.png" height="20px"/></td> <td width="60%" align="center"><span class="LABEL_HEADING">BUILD ORDER</span></td> <td width="20%"> <span class="LABEL_BOLD">Kazeon SO</span><br /><apex:outputText value="{!so.Name}" /> </td> <td width="20%"> <span class="LABEL_BOLD">Date</span><br /><apex:outputText value="{!TEXT(MONTH(TODAY()))&'/'&TEXT(DAY(TODAY()))&'/'&TEXT(YEAR(TODAY()))}" /> </td> </tr> </table> </div> <div class="OUTLINE_LIGHT"> <table cellpadding="2" cellspacing="0" border="0" width="100%"> <tr> <td valign="top"> <table cellpadding="4" cellspacing="0" border="0" width="100%"> <tr> <td align="right"><span class="LABEL_BOLD">Customer: </span></td> <td><apex:outputText styleClass="" value="{!so.Account__r.Name}" /></td> </tr> <tr> <td align="right"><span class="LABEL_BOLD">PO: </span></td> <td><apex:outputText value="{!so.PurchaseOrderNumber__c}" /></td> <tr> <apex:outputPanel rendered="{!NOT(ISNULL(so.Partner_Sales_Order__c))}" layout="none"> <tr> <td align="right"><span class="LABEL_BOLD">Partner SO: </span></td> <td><apex:outputText value="{!so.Partner_Sales_Order__c}" /></td> </tr> </apex:outputPanel> </table> </td> <td> <table cellpadding="4" cellspacing="0" border="0" width="100%"> <tr> <td valign="top" align="right"><span class="LABEL_BOLD">Shipping Address:</span></td> <td> <pre><apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingStreet__c))}" layout="none"><apex:outputText value="{!so.ShippingStreet__c}" /><br /></apex:outputPanel> <apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingCity__c))}" layout="none"><apex:outputText value="{!so.ShippingCity__c}" />, </apex:outputPanel> <apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingState__c))}" layout="none"><apex:outputText value="{!so.ShippingState__c}" /> </apex:outputPanel> <apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingPostalCode__c))}" layout="none"><apex:outputText value="{!so.ShippingPostalCode__c}" /></apex:outputPanel> <apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingCountry__c))}" layout="none"><br />(<apex:outputText value="{!so.ShippingCountry__c}" />)</apex:outputPanel></pre> </td> </tr> </table> </td> </tr> </table> </div> </apex:component>
-
- gribis
- March 16, 2009
- Like
- 0
- Continue reading or reply
How can I generate PageReferences to a specific view(e.g. New Contact) in VF controller APEX code?
...<apex:stylesheet value="{!URLFOR($Resource.pdfresources, 'styles.css')}"/>...
PageReference lPr = new PageReference('/a0F/e—CF00N30000002qbnG='+EncodingUtil.urlEncode(this.lCase.Account.Name,'UTF-8')+'&CF00N30000002qbnG_lkid='+EncodingUtil.urlEncode(this.lCase.AccountId,'UTF-8')+'&saveURL='+EncodingUtil.urlEncode('/apex/CaseClusters–id='+EncodingUtil.urlEncode(this.lCase.Id,'UTF-8'),'UTF-8')+'&retURL='+EncodingUtil.urlEncode('/apex/CaseClusters˜id='+EncodingUtil.urlEncode(this.lCase.Id,'UTF-8'),'UTF-8'));
Cluster__c theNewCluster = new Cluster__c(Account__c = this.lCase.AccountId); PageReference lPr = (new ApexPages.StandardController(theNewCluster)).edit();
Is there a better way to handle this in APEX code, where the URLs are created dynamically, environment independent?
Any input would be greatly appreciated.
-
- gribis
- November 20, 2008
- Like
- 0
- Continue reading or reply
Access APEX webservice from PHP
-
- gribis
- April 16, 2008
- Like
- 0
- Continue reading or reply
"An internal server error has occurred" when rendered as pdf
We are trying to render build specifications based on sales order data. Various data elements need to be pulled in and related to output the necessary content. The Visual Force page leverages the standard controller for the SalesOrder custom object, and uses an extension controller to pull together all the relevant related records.
Problem: When this page is rendered as HTML, the page displays as expected. However, if the page is rendered as PDF, a generic error message appears:
An internal server error has occurred |
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. Thank you again for your patience and assistance. And thanks for using Salesforce! Error ID: 938602852-1015 (-236663650) |
How can we get more information about the source of the issue that causes this error? Better yet, what is the cause of the problem?
The related code is attached below:
Main VS Page:
<apex:page standardController="kaz_salesorder__c" extensions="extSalesOrderPrint" showHeader="false" renderAs="pdf"> <html> <head> <style type="text/css" media="print"> .PB { page-break-inside: avoid; page-break-after: always; height: 100%; width: 100%; border: solid 0px #000000; } .PBAVOID, .PBAVOID div, .PBAVOID table{ page-break-inside: avoid;} body { margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif; } @page { size: portrait; } </style> <style type="text/css" media="screen,print"> body, td, span, div { font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif; font-size: 11px;} .OUTLINE_DARK, .OUTLINE_MEDIUM, .OUTLINE_LIGHT { border: solid 1px #000000; padding: 5px; } .OUTLINE_DARK { background-color: #CCCCCC; } .OUTLINE_MEDIUM { background-color: #EEEEEE; } .OUTLINE_LIGHT { background-color: none; } .LABEL_BOLD { font-weight: bold; font-size: 12px;} .LABEL_LARGE { font-weight: bold; font-size:16px; } .LABEL_HEADING { font-weight: bold; font-size:22px; } td.BOMChecklist, th.BOMChecklist { border-bottom: 1px solid #000000;border-right: 1px solid #000000;} table.BOMChecklist { border-top: 1px solid #000000;border-left: 1px solid #000000;} table.BOMChecklist th, th.BOMChecklist{ Background-Color: #eeeeee; font-size: 14; } table.ProductList td, table.ProductList th { border-bottom: 1px solid #000000;border-right: 1px solid #000000;} table.ProductList th { Background-color: #eeeeee; font-size: 14; text-align: right;} table.ProductList { border-top: 1px solid #000000;border-left: 1px solid #000000;} table.AvoidBorder td, table.AvoidBorder th { border-bottom: 0px solid #000000;border-right: 0px solid #000000;} </style> </head> <body> <apex:variable var="itemIndex" value="{!0}" /> <apex:outputPanel rendered="{!(HwBaseItems.size>0)}" layout="none" id="hw"> <apex:repeat value="{!HwBaseItems.items}" var="li" id="HwLineItems"> <apex:repeat value="{!li.assets}" var="ia" id="ItemAssets"> <apex:variable var="itemIndex" value="{!(itemIndex+1)}" /> <div class="PB"> <c:BuildSheetHeader so="{!kaz_salesorder__c}" /> <br /> <apex:variable var="FeatureLicensesCombined" value="{!IF(ISNULL(li.item.Product__r.Addon_Licenses__c),'',li.item.Product__r.Addon_Licenses__c)}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAssets2"><apex:variable var="FeatureLicensesCombined" value="{!IF(FeatureLicensesCombined='','',FeatureLicensesCombined&' ')&IF(ISNULL(ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c),'',ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c)}" /></apex:repeat> <c:BuildSheetItemDetails ProductCategory="Appliance" ProductItemIndex="{!Text(itemIndex/1)}" ProductCode="{!li.item.ProductCode__c}" ItemName="{!ia.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ia.duration}" ProductName="{!li.item.ProductName__c}" BaseLicense="{!li.item.Product__r.Base_License__c}" FeatureLicense="{!FeatureLicensesCombined}"/> <br /> <c:BillOfMaterialChecklist bom="{!li.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> <apex:variable var="itemSubIndex" value="{!0}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAddonAssets"> <apex:variable var="itemSubIndex" value="{!(itemSubIndex+1)}" /> <br /> <c:BuildSheetItemDetails ProductCategory="Installed Add-on Item" ProductItemIndex="{!TEXT(itemIndex/1)&'.'&TEXT(itemSubIndex/1)}" ProductCode="{!ra.itemAsset.Sales_Order_Item__r.Product__r.ProductCode}" ItemName="{!ra.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ra.duration}" ProductName="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Name}" BaseLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Base_License__c}" FeatureLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c}"/> <br /> <c:BillOfMaterialChecklist bom="{!ra.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> </apex:repeat> </div> </apex:repeat> </apex:repeat> </apex:outputPanel> <apex:outputPanel rendered="{!(SwBaseItems.size>0)}" layout="none" id="sw"> <apex:repeat value="{!SwBaseItems.items}" var="li" id="SwLineItems"> <apex:repeat value="{!li.assets}" var="ia" id="ItemAssets"> <apex:variable var="itemIndex" value="{!(itemIndex+1)}" /> <div class="PB"> <c:BuildSheetHeader so="{!kaz_salesorder__c}" /> <br /> <apex:variable var="FeatureLicensesCombined" value="{!IF(ISNULL(li.item.Product__r.Addon_Licenses__c),'',li.item.Product__r.Addon_Licenses__c)}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAssets2"><apex:variable var="FeatureLicensesCombined" value="{!IF(FeatureLicensesCombined='','',FeatureLicensesCombined&' ')&IF(ISNULL(ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c),'',ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c)}" /></apex:repeat> <c:BuildSheetItemDetails ProductCategory="Software Only" ProductItemIndex="{!Text(itemIndex/1)}" ProductCode="{!li.item.ProductCode__c}" ItemName="{!ia.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ia.duration}" ProductName="{!li.item.ProductName__c}" BaseLicense="{!li.item.Product__r.Base_License__c}" FeatureLicense="{!FeatureLicensesCombined}"/> <br /> <c:BillOfMaterialChecklist bom="{!li.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> <apex:variable var="itemSubIndex" value="{!0}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAddonAssets"> <apex:variable var="itemSubIndex" value="{!(itemSubIndex+1)}" /> <br /> <c:BuildSheetItemDetails ProductCategory="Installed Add-on Item" ProductItemIndex="{!TEXT(itemIndex/1)&'.'&TEXT(itemSubIndex/1)}" ProductCode="{!ra.itemAsset.Sales_Order_Item__r.Product__r.ProductCode}" ItemName="{!ra.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ra.duration}" ProductName="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Name}" BaseLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Base_License__c}" FeatureLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c}"/> <br /> <c:BillOfMaterialChecklist bom="{!ra.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> </apex:repeat> </div> </apex:repeat> </apex:repeat> </apex:outputPanel> <apex:outputPanel rendered="{!(AddonItems.size>0)}" layout="none" id="addon"> <apex:repeat value="{!AddonItems.items}" var="li" id="AssonLineItems"> <apex:repeat value="{!li.assets}" var="ia" id="ItemAssets"> <apex:outputPanel rendered="{!NOT(ia.HasParent)}" layout="none" id="addon"> <apex:variable var="itemIndex" value="{!(itemIndex+1)}" /> <div class="PB"> <c:BuildSheetHeader so="{!kaz_salesorder__c}" /> <br /> <apex:variable var="FeatureLicensesCombined" value="{!IF(ISNULL(li.item.Product__r.Addon_Licenses__c),'',li.item.Product__r.Addon_Licenses__c)}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAssets2"><apex:variable var="FeatureLicensesCombined" value="{!IF(FeatureLicensesCombined='','',FeatureLicensesCombined&' ')&IF(ISNULL(ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c),'',ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c)}" /></apex:repeat> <c:BuildSheetItemDetails ProductCategory="Add-on Item" ProductItemIndex="{!Text(itemIndex/1)}" ProductCode="{!li.item.ProductCode__c}" ItemName="{!ia.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ia.duration}" ProductName="{!li.item.ProductName__c}" BaseLicense="{!li.item.Product__r.Base_License__c}" FeatureLicense="{!FeatureLicensesCombined}"/> <br /> <c:BillOfMaterialChecklist bom="{!li.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> <apex:variable var="itemSubIndex" value="{!0}" /> <apex:repeat value="{!ia.assets}" var="ra" id="RelatedAddonAssets"> <apex:variable var="itemSubIndex" value="{!(itemSubIndex+1)}" /> <br /> <c:BuildSheetItemDetails ProductCategory="Installed Add-on Item" ProductItemIndex="{!TEXT(itemIndex/1)&'.'&TEXT(itemSubIndex/1)}" ProductCode="{!ra.itemAsset.Sales_Order_Item__r.Product__r.ProductCode}" ItemName="{!ra.item.Name}" Release="{!kaz_salesorder__c.Release__c}" Duration="{!ra.duration}" ProductName="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Name}" BaseLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Base_License__c}" FeatureLicense="{!ra.itemAsset.Sales_Order_Item__r.Product__r.Addon_Licenses__c}"/> <br /> <c:BillOfMaterialChecklist bom="{!ra.bom}" channel="{!kaz_salesorder__c.Channel__c}" /> </apex:repeat> </div> </apex:outputPanel> </apex:repeat> </apex:repeat> </apex:outputPanel> </body> </html> </apex:page>
BuildSheetHeader code:
<apex:component > <apex:attribute name="so" description="Items reflects the Sales Order object" type="kaz_salesorder__c" required="true"/> <div class="OUTLINE_DARK"> <table width="100%"> <tr> <td width="0%"><img src="{!$Resource.TrainingCertificate}/kazeon_logo_hd.png" height="20px"/></td> <td width="60%" align="center"><span class="LABEL_HEADING">BUILD ORDER</span></td> <td width="20%"> <span class="LABEL_BOLD">Kazeon SO</span><br /><apex:outputText value="{!so.Name}" /> </td> <td width="20%"> <span class="LABEL_BOLD">Date</span><br /><apex:outputText value="{!TEXT(MONTH(TODAY()))&'/'&TEXT(DAY(TODAY()))&'/'&TEXT(YEAR(TODAY()))}" /> </td> </tr> </table> </div> <div class="OUTLINE_LIGHT"> <table cellpadding="2" cellspacing="0" border="0" width="100%"> <tr> <td valign="top"> <table cellpadding="4" cellspacing="0" border="0" width="100%"> <tr> <td align="right"><span class="LABEL_BOLD">Customer: </span></td> <td><apex:outputText styleClass="" value="{!so.Account__r.Name}" /></td> </tr> <tr> <td align="right"><span class="LABEL_BOLD">PO: </span></td> <td><apex:outputText value="{!so.PurchaseOrderNumber__c}" /></td> <tr> <apex:outputPanel rendered="{!NOT(ISNULL(so.Partner_Sales_Order__c))}" layout="none"> <tr> <td align="right"><span class="LABEL_BOLD">Partner SO: </span></td> <td><apex:outputText value="{!so.Partner_Sales_Order__c}" /></td> </tr> </apex:outputPanel> </table> </td> <td> <table cellpadding="4" cellspacing="0" border="0" width="100%"> <tr> <td valign="top" align="right"><span class="LABEL_BOLD">Shipping Address:</span></td> <td> <pre><apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingStreet__c))}" layout="none"><apex:outputText value="{!so.ShippingStreet__c}" /><br /></apex:outputPanel> <apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingCity__c))}" layout="none"><apex:outputText value="{!so.ShippingCity__c}" />, </apex:outputPanel> <apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingState__c))}" layout="none"><apex:outputText value="{!so.ShippingState__c}" /> </apex:outputPanel> <apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingPostalCode__c))}" layout="none"><apex:outputText value="{!so.ShippingPostalCode__c}" /></apex:outputPanel> <apex:outputPanel rendered="{!NOT(ISNULL(so.ShippingCountry__c))}" layout="none"><br />(<apex:outputText value="{!so.ShippingCountry__c}" />)</apex:outputPanel></pre> </td> </tr> </table> </td> </tr> </table> </div> </apex:component>
- gribis
- March 16, 2009
- Like
- 0
- Continue reading or reply
How can I generate PageReferences to a specific view(e.g. New Contact) in VF controller APEX code?
...<apex:stylesheet value="{!URLFOR($Resource.pdfresources, 'styles.css')}"/>...
PageReference lPr = new PageReference('/a0F/e—CF00N30000002qbnG='+EncodingUtil.urlEncode(this.lCase.Account.Name,'UTF-8')+'&CF00N30000002qbnG_lkid='+EncodingUtil.urlEncode(this.lCase.AccountId,'UTF-8')+'&saveURL='+EncodingUtil.urlEncode('/apex/CaseClusters–id='+EncodingUtil.urlEncode(this.lCase.Id,'UTF-8'),'UTF-8')+'&retURL='+EncodingUtil.urlEncode('/apex/CaseClusters˜id='+EncodingUtil.urlEncode(this.lCase.Id,'UTF-8'),'UTF-8'));
Cluster__c theNewCluster = new Cluster__c(Account__c = this.lCase.AccountId); PageReference lPr = (new ApexPages.StandardController(theNewCluster)).edit();
Is there a better way to handle this in APEX code, where the URLs are created dynamically, environment independent?
Any input would be greatly appreciated.
- gribis
- November 20, 2008
- Like
- 0
- Continue reading or reply
Access APEX webservice from PHP
- gribis
- April 16, 2008
- Like
- 0
- Continue reading or reply