function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Wayne_ClarkWayne_Clark 

Visualforce Time Cards from Account with critieria set in an Apex Class extension

Hello,, I wanted to get a little feedback to see if this requirement would even possible.

 

Requirement: User navigates to Account, enters start and end dates, then hits a button that will display individual time card information for employees of that Account that have submitted time within that date range specified by the user.

 

There may be multiple employees that have submitted time within the specified date range, I'm just wondering if it's possible for the user to be able to press a button that would open the multiple PDF's of the different data from the employees. So, if there were 2 employees that submitted time within the specified time frame, then there would be 2 PDF pages.

 

I created a custom Time Card object, which is a Master/Detail to the Contact and contains a look up to the Account.  I found the print out of time cards to be easily done on the individual Contact object, but that would require our users to navigate to the individual Contact records to print out there time card for the date range specified.  But, this solution is not ideal as the users may not know who has submitted time cards as employees could change.

 

I'm trying to find out if it's possible for the user to navigate to the Account record, enter a time frame and be able to press a button that would list the employee and there time card data on individual print outs, and not have all the diifferent employees and there data on one big print out. 

 

Is this even possible?  Thanks!

 

 

FromCRMWonderlandFromCRMWonderland

You can follow steps as follows:-

 

1) Create inline vf page which will allow users to enter duration. Please note to display this vf page on account detail page. Place one button on the same page which will redirect user to another vf page.

2) This second vf page will display list of all users who are under specified requirement. Place one hyperlink against each user.

3) when user will click on this link, user will be redirected to pdf for that particular user.

 

The only issue in this solution is that it does open all different pdfs for individual users in single go, instead user has to click on link for each user. I guess this is the only feasible solution.

 

-- alok