• p1_dfs
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 10
    Replies

I am getting following erro while executing a test method.

 

Does anyone know what it is

 

System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, admin operation already in progress: [] 

 

 

  • October 31, 2009
  • Like
  • 0
 
We have a few VF pages rendered as PDF which are using <Apex: dataTable>. This document is genereated in protrait size with 8 columns. It also include Product Name (80 char).
 
I want the text to be wrapped in each column. If I render the page as HTML then it works, but it does not work for PDF. I am even specifying the columnsWidth attribute.
 
 
Code:
<apex:dataTable width="100%" border="0" id="DataTable" value="{!SalesOrderLines}" var="SalesOrderLine" style="font-size:10px;vertical-align:top;word-wrap: break-word;"  headerClass="headerrow" 
   columnsWidth="60,250,90,50,95,100,100,100" rowclasses="odd,even" >


 <apex:column headervalue="Line">
             <apex:outputField value="{!SalesOrderLine.Name}"/>
 </apex:column>   
 <apex:column style="width: 200px;word-wrap:break-word" >
     <apex:facet name="header">
 {!$ObjectType.SalesOrderLine__c.Fields.Product__c.label}                                 
      </apex:facet>
        {!IF(SalesOrderLine.Product__r.name = null,SalesOrderLine.Product__c, SalesOrderLine.Product__r.name)}
 </apex:column> 
.......
</apex:dataTable>

 I have even tried putting following style for <td> in the page
 
Code:
<style type="text/css">
  td {
    word-wrap: break-word;
  }
</style>

 
Does anyone has any idea, what is the best way to achieve word wraping for PDFs. This is very urgent !!!
 

 
 
I also
  • October 26, 2008
  • Like
  • 0
We are creating a PDF document using Visual Force Page and the document has a logo ( a png or gif image file on header). Currently the image file is a static resource and using merge field the VF page is able to display it correctly. When we do the packaging the resource is also packaged and is getting installed without any issues.

 

Now we want to change the logo at the installed org , as the logo was bundled as static resource it cannot be modified so, we are trying to place the image in a document folder and refer it  in VF page but the image is not displaying correctly .  We have tried using  url for the image but it is not working . Your help or a working example  will be appreciated in resolving this issue.

 <apex:image value="{!$Resource.gii__logo}"/>

We are trying to package the application as managed beta. The static resources gets locked in the target org.

So we are not able to change the logo.

Is there any way we can use a logo file from the document folder in

We already tried using the URL <apex:image url="/document/image/logo.jpg"/>.  But it does not work..

Is there any way to get the URL for the documents within the org itself.


**This is very urgent, **  Your help is much appreciated



  • September 05, 2008
  • Like
  • 0
Hi,

I have several  Visual Force pages where I am rendering as a pdf. I want to add page breaks and repeat page header (which includes company logo / address, document number, page number etc )  to the pdf document .

I am able to display page number by using  @PAGE rule in the CSS.
I am using <PANELGRID> for the header and <DATATABLE> to display detail information. Is there a way to control the number of lines in a page and repeat some header on all pages.

Is there any way we can control this?

thanks

I've recently been wanting to generate a PDF from a visualforce page but with page breaks in various places.  Is this something that I can do using CSS or will I have to have lots of <br /> tags in my page?
We are creating a PDF document using Visual Force Page and the document has a logo ( a png or gif image file on header). Currently the image file is a static resource and using merge field the VF page is able to display it correctly. When we do the packaging the resource is also packaged and is getting installed without any issues.

 

Now we want to change the logo at the installed org , as the logo was bundled as static resource it cannot be modified so, we are trying to place the image in a document folder and refer it  in VF page but the image is not displaying correctly .  We have tried using  url for the image but it is not working . Your help or a working example  will be appreciated in resolving this issue.

 <apex:image value="{!$Resource.gii__logo}"/>

We are trying to package the application as managed beta. The static resources gets locked in the target org.

So we are not able to change the logo.

Is there any way we can use a logo file from the document folder in

We already tried using the URL <apex:image url="/document/image/logo.jpg"/>.  But it does not work..

Is there any way to get the URL for the documents within the org itself.


**This is very urgent, **  Your help is much appreciated



  • September 05, 2008
  • Like
  • 0
I want to output a &nbsp; when i run into a null so that my table does not have a break in the row line.  However I can't output a &nbsp; in
Code:
 {!if(!TSK.isEvent,nullValue(TSK.t.RelatedName__c,' ' ),TSK.e.RelatedName__c)}

 
and a space doesn't do anything
Any ideas?
  • August 27, 2008
  • Like
  • 0
I would like to permanently delete records from one of the custom object . basiclly do not want to see any records in recycle bin as the custom objects holds temporary queue records in my app.
 
Any help will be appreciated.
 
  • August 11, 2008
  • Like
  • 0
Hello.  I am currently doing pdf generation using an external web service that i wrote - but i'm looking to move the functionality into sfdc using the new apex to pdf.  The pdf that i generate has multiple pages - all with a common header (with images).  I've seen from other threads that this isn't quite supported in any automated fashion (http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=3205).  So I guess the alternative is to foce page breaks and re-draw the header. 

My pdf will have either one or two dynamic pages (based on the number of line items), and 4 static pages (terms of sale, etc).  So the static pages are easy, but my question is, can I conditionally draw the second dynamic page?  That is, if I have more than 6 line items, draw the second dynamic page.  Otherwise, go straight to the static pages.  Is this possible using the VF markup?  Are there any samples with forced page breaks?  I found one thread where a page break is forced, but there's no conditional logic around it (http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=3880).  Do I just throw all of the necessary logic into the apex:repeat block?

Thanks
Chris
  • August 05, 2008
  • Like
  • 0
Hi,

I have a Visual Force page which I am rendering as a pdf. I want to add page breaks to the pdf file because if the page is longer than 1 page it just splits up the page wherever it runs over. Is there any way I can control this?

Thanks
Jina
Hello,
 
We are having two related issues with using images in our VF pages for our products that we want to render to PDF (we are running in a Sandbox with Summer '08):
 
 
1) when we include an image file from an external server , the page will not render at all and gives an error 500.  No PDF is generated at all.    We have tried bringing the image in using both a normal <img> tag as well as the <apex:image >  tags. We have tried being in and out of developer mode, and have tried https and http URLs to the external server that is hosting the image.  The image does show in a browser window when we remove the 'renderAs=PDF'.  We have tried images of various sizes from multiple external servers and the results are always the same - will show in browser window, will not even render the pdf file.
 
2)   We also have an image at the top of the page which is a Static resource in SF.  this image is essentially our logo header.  When we choose render as pdf, (and remove any external image links), the PDF will be generated however the logo file does not appear.  Again, it shows if we remove the renderAs PDF.  As soon as we try to render as PDF, the image disappears.
 
 
Any ideas?  is there any more information that I can provide??
 
thanks!
I'm having trouble setting the selectedTab attribute of a tabPanel dynamically.  It works fine if I set selectedTab to a string in the visualforce page, but if I try and use something set by the controller it doesn't work.  Am I missing something obvious or is there an issue with the tabPanel tag?  

Controller:

Code:
public class testTabController {
 String tabInFocus = System.currentPageReference().getParameters().get('tab');
 public String getTabInFocus() {
  return tabInFocus;
 }
 public void setTabInFocus( String s ) {
  this.tabInFocus = s;
 }
}

 Page:
Code:
<apex:page controller="testTabController" sidebar="false" showheader="true">

 <p>tabInFocus: &lt;{!TabInFocus}&gt;</p>
 <apex:tabPanel switchType="client" selectedTab="{!TabInFocus}" id="testTabs">
  
  <apex:tab label="Label 1" name="oneTab" id="tab1" >
   <p>This is number one</p>
  </apex:tab>
  
  <apex:tab label="Label 2" name="twoTab" id="tab2" >
   <p>This is number two</p>
  </apex:tab>
  
  <apex:tab label="Label 3" name="threeTab" id="tab3" >
   <p>This is number three</p>
  </apex:tab>
  
 </apex:tabPanel>

</apex:page>

URL:
Code:
/apex/test_tab?tab=twoTab

 


 
The tab is selected properly if I use a static string, e.g.:

Code:
<apex:tabPanel switchType="client" selectedTab="twoTab" id="testTabs">

 
Any ideas?