• Rajit
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hi,

 

I would like to know whether there is any method or property exposed in metadata or partner WSDL using which we can retrieve the dependency information for a field. It's similar to the information that we get when we try to delete any field ... it shows classes,workflows or formula where that particular field is referenced.

 

 

Thanks,

 

 

  • July 09, 2010
  • Like
  • 0

Hi Everyone,

 

I am having a strange problem while rendering a page as pdf.

 

Please help guys!

 

 

Problem :

I am trying to use apex:repeat for iterating over a List<List<Sobject>>. my VF page as html renders well.

But when I try to render it as pdf ,it gives me a blank pdf.

 

My Code :

<apex:Page .... renderas="pdf">

 <apex:repeat value="{!ListListOFSOBJECT}" var="list" id="theRepeat">

    <table >

          <apex:repeat value="{!list}" var="item">
                  <tr>
                       <td>
                            {!item.name}

                        </td>

                  </tr>      
                        
         </apex:repeat>
     </table>
</apex:repeat>

</apex:page>

 

This is resulting into blank pdf.

As a workaround i tried to pass the list <apexclassX> to repeat tag

where class X {

 list<SOBJECT>

}

 

But this approach also resulted in a blank pdf.

 

Please Help!

 

  • May 20, 2010
  • Like
  • 0

I am using Apex class scheduler interface to schedule apex class.

But since that class has apex method with @future annotation its taking long to run.

Is there any way to monitor the job ? e.g. to find out how many number of records are processed ? or what is the current status of the job?

  • April 19, 2010
  • Like
  • 0

I am trying to deploy one class which has implemented Schedulable interface.

But when I try to deploy it using ANT I am getting the following error :

"Schedulable class has jobs pending or in progress".

 

I am waiting for this to get resolved since more than 48 hrs and it doesn't seem to resolve.

What can be done in such case? How to deploy it to production? I tried to deploy by making packages but could not since the components in the package already exist in production and gives an error when I unzip the package. Please suggest what can be done in this situation.

  • March 26, 2010
  • Like
  • 0

Hi Everybody,

 

I need to get the Displayformat of an autonumber field from the Api .I couldn't get it using describeSobject() call.

 

Thanks!

 

   

 

 

  • March 19, 2010
  • Like
  • 0

 

 

Where is Mapping of picklist values to a particular RecordType defined?

I couldn't find it in the API.

 

 

 

 

  • March 04, 2010
  • Like
  • 0

Hi Everyone,

 

I am having a strange problem while rendering a page as pdf.

 

Please help guys!

 

 

Problem :

I am trying to use apex:repeat for iterating over a List<List<Sobject>>. my VF page as html renders well.

But when I try to render it as pdf ,it gives me a blank pdf.

 

My Code :

<apex:Page .... renderas="pdf">

 <apex:repeat value="{!ListListOFSOBJECT}" var="list" id="theRepeat">

    <table >

          <apex:repeat value="{!list}" var="item">
                  <tr>
                       <td>
                            {!item.name}

                        </td>

                  </tr>      
                        
         </apex:repeat>
     </table>
</apex:repeat>

</apex:page>

 

This is resulting into blank pdf.

As a workaround i tried to pass the list <apexclassX> to repeat tag

where class X {

 list<SOBJECT>

}

 

But this approach also resulted in a blank pdf.

 

Please Help!

 

  • May 20, 2010
  • Like
  • 0

 

 

Where is Mapping of picklist values to a particular RecordType defined?

I couldn't find it in the API.

 

 

 

 

  • March 04, 2010
  • Like
  • 0

Is there any way to change or delete a Scheduled Job ?  I am able to create one easily enough, but once it is made I can only look at the values in the CronTrigger object, but not update them.  Also, it seems I cannot delete them.  I also looked at the System.AbortJob method, but that seems to only stop a job that is already running - I get an error if I try it on a Queued job.

 

The reason I am doing this is to try to create a 'sliding' job.  So, when a trigger is fired the job will run in 5 minutes.  But if the trigger is fired again before that 5 minutes is up, it will find the old job and either delete it and make a new one for 5 minutes out, or update the old one so the next scheduled time is in 5 minutes.

 

Any ideas are welcome!

 

Jason

 

 

In this thread, Doug Chasman wrote:
You are correct on the controller lifecycle - the request to get the content to be converted to pdf is a separate HTTP GET request and the viewstate/controller is not preserved on a GET. This is primarily because of some internal Visualforce details and does not have to be this way forever but it is going to be this way for awhile.

For now you will need to manage data passing yourself, e.g. either by using query parameters or using an sobject(s) that have been saved (this will be visible to the PDF generation request).
We just ran into this - I have a StandardSetController extension which backs a visualforce page. The controller acts on the selected records from a standard list view page (via stdController.getSelected()), and then renders a page with a bunch of data from those selected records.

The page works 100% fine if it is not rendered as pdf, but as soon as I throw the "renderAs="PDF"" in the page tag, the selections get lost and no relevant data is displayed.

If what Doug says is correct, is there a recommended way around this if the controller is managing a large amount of data? Is the solution really as Doug says, to use query parameters or saved SObjects?

Since we will have this need in several pages, I am thinking of implementing a general purpose "presisted developer hashmap" for passing data to PDF controllers. It would basically consist of a master-detail relationship between 2 objects, something like ApexRequest and ApexRequestEntry.

ApexRequest is just a header, maybe we add an "expireDate" to support periodic data cleanup. ApexRequestEntry has just 2 custom fields, probably both strings, as a key/value pair.

Our standardSetControllers that need to render PDF's will do whatever pre-processing / data retrieval they need to do and then put the results in a bunch of ApexRequestEntry objects under a single ApexRequest. They will then render a PageReference redirect to the actual PDF-backing page controller, passing the ID of the ApexRequest as a query parameter. Then the controller for the PDF can read all the key/value pair entries and do what it needs to do. For most of the stuff we're envisioning, the ApexRequestEntry objects would just hold other SObject ID's as values, and the target PDF controllers would know to use them in aggregate as the various "IN" clauses for their queries.

It is a pretty elaborate fix, but we will need to do this in quite a few places and I don't want some hack solution that involves every controller parsing a 32k text field :)

Has anyone found a more elegant solution for this dire limitation of PDF-backing page controllers?

Salesforce doc team, if you are listening, this limitation REALLY needs to be documented! It is not mentioned in any of the 4 pages in the VF guide that refer to PDF generation. It cost my team a couple hours in debugging before realizing it was purely related to the renderAs attribute changing controller behavior.

Jeremy Kraybill
Austin, TX