• Jason Hartfield
  • NEWBIE
  • 0 Points
  • Member since 2014
  • Developer
  • TripPlanning.biz

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hello.  I started using the the WebServiceMock interface shortly after it came out, but there was an issue where it would throw the "uncommitted work pending" exception.  this is found elsewhere in the forums.  i recently had the need to use WebServiceMock again - and i found that the issue was resolved (https://developer.salesforce.com/forums?id=906F0000000927CIAQ) - so i tried it.  but i'm still having the same issue - sometimes.   My callout happens either as the result of a trigger execution or a batch process.  With the trigger, it works perfectly - no "uncommited work pending" exception.  however when i call it from my batch process, i'm still seeing the same issue.

a few notes here.  i've confirmed that all of my code is v29.  in my batch process, i disable the trigger - so it's not like the callout is firing multiple times.  i've implemented my test method per the instructions noted in the linkd above (first setup data, then calling Test.startTest, then setMock, then do callout, then call stopTest.  i've checked the debug log thoroughly - there is no dml between my Test.startTest and the callout.  so this is a bit mysterious to me.  is anyone seeing a similar issue?

thanks
chris

Hi,

 

I'm trying to create a table of contents in a visualforce page rendered as a pdf. Has anybody done this? Is this even possible?

 

I'm looking for something that would end up looking like:-

 

1. Lorem Ipsum......................1

2. Lorem Ipsum......................2

3. Lorem Ipsum......................2

4. Lorem Ipsum......................3 

 

(heading).............................(page number)

 

I know I can do the first bit but I don't have any way of knowing which page the heading will fall on due to differing content lengths.

 

Thanks for any help.

Rich.

Hi,

 

I'm trying to create a table of contents in a visualforce page rendered as a pdf. Has anybody done this? Is this even possible?

 

I'm looking for something that would end up looking like:-

 

1. Lorem Ipsum......................1

2. Lorem Ipsum......................2

3. Lorem Ipsum......................2

4. Lorem Ipsum......................3 

 

(heading).............................(page number)

 

I know I can do the first bit but I don't have any way of knowing which page the heading will fall on due to differing content lengths.

 

Thanks for any help.

Rich.