Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Print Preview Script of just one record


dmontano

Recommended Posts

I am trying to create a script that creates a separate window and displays the print preview of the print layout for that one record.

 

I am getting exactly what I want from the script I have created - except it previews all records beginning with the first record.

 

My intention is to allow the User to see or inspect the print preview before they commit to the print function of the one record.

 

I think the solution is to insert a script step that finds just the one record AND ommit all the other records - then enter Preview Mode. However, I can not figure out how to do that.

 

The Preview that I want to create is on another layout - but within the same table. Screenshot shows what Icurrently have.

Link to comment
Share on other sites

I think the solution is to insert a script step that finds just the one record AND ommit all the other records - then enter Preview Mode.

 

 

Preview mode shows all records in a found set, so you first need to perform a find that produces only the record you want to see.

Link to comment
Share on other sites

Thanks HB,

 

I am having trouble figuring out how to do just that. All of my other find scripts have just been to put the user "in" Find Mode - now I am trying to figure out how I define the find to deliver the results.

 

Any pointers?

Link to comment
Share on other sites

Thanks HB and Ender,

 

Once again - sound advice I am sure. I have added those steps, however, I am still unable to get it to work. Getting results but not the isolated record in preview.

 

I suspect my problem lies in not understanding how to specify the "Set Field" in my solution due to the myraid of relationships I have concocted and the maze of windows and options to choose from. (easy for others - but this must be my kryptonite)

 

I am NOT "relationship-capable". I am really struggling with understanding it and I am sure that is my biggest problem. Once again showing up in just this one script construction.

 

How long does it take to "get it"? I am beginning to wonder if it takes a different brain type. Anyways, off to lunch to read my FM book so it at least "looks" like I am getting it.

 

Sincerely appreciate the help, seems like a life-line at times.

Link to comment
Share on other sites

Hi,

 

Ender's suggestion does not require fields to be set, so it should work on its own.

 

Another option would be to use Go To Related Record to open just your record in a new window, and only then go into Find mode. The nice thing is this approach doesn't disturb your current found set. The disadvantage is, you may need to make sure the user can't close the window in an unscripted manner, to avert problems managing multiple windows.

Link to comment
Share on other sites

Thanks Lingo - you are right: Ender was spot on - as I suspected. Seems like I needed a new day to see that I had made the adjustments as Ender recommended, but forgot to reassign to the new script.

 

(I make a duplicate and tweek each script that is not working so I can try to get it to work without destroying my previous logic attempt.)

 

Awesome. I just needed that last little shove!

 

I did try the gtrr approach but once again, I think my mind was jello at the time. Slowly I am learning... or I should say finding people to help plug all the leaks I have.

 

Thanks to all 3.

Link to comment
Share on other sites

  • 4 weeks later...

I did get this to work with the help from the forum - thanks!

 

However (I have a lot of howevers) I have one contract that is 3 pages. So the script I built does take the user to the preview of it - however - only the first page. Is there a way I can extend the script to allow the user to preview page 2 and 3? I do not think I can create a button and have it function once I take the user into preview mode. Even if that is possible - the button would print on the contract - I think.

 

I know in preview mode, you can scroll through pages of a layout in the status area - however, in my solution, I hide the status area.

 

If I can get this to work - I would feel like I would avoid any users from wondering why they can't preview the whole contract.

 

Any ideas?

Thanks

Link to comment
Share on other sites

I have one contract that is 3 pages. So the script I built does take the user to the preview of it - however - only the first page. Is there a way I can extend the script to allow the user to preview page 2 and 3? I do not think I can create a button and have it function once I take the user into preview mode. Even if that is possible - the button would print on the contract - I think.

 

It's true that the button would not function in Preview mode. You can set it to not print (layout mode, select object, format menu, sliding/printing, check "Do not print selected objects")

 

I know in preview mode, you can scroll through pages of a layout in the status area - however, in my solution, I hide the status area.

 

After navigating to the contract layout show status area. Pause the script. When it resumes hide the status area. I'm assuming, of course that none of your layouts are included in layout menus (option on layout setup dialog).

Link to comment
Share on other sites

Obviously you want something more immediately apparent to the user than this, but users can Ctrl+up or down to change pages in Preview mode.

Link to comment
Share on other sites

Okay, I have pulled from as many sources on the forum and I have a comingled scripts and advice given that many can take some form of credit for - except I have a few issues I really would like to iron out and understand from the concoction I created. It does bring up a custom dialog with buttons that control page "next", "previous", and "close". The script does almost everything that I want, except:

 

I had to set zoom to 100%, instead of my preferred 150% ...because... the scroll bar on the right side of the window now became disabled for the user. That meant users could not scroll down to the bottom of a page to see vital contract information in preview with this script. While very small screens may even need further zoom reduction - it becomes unreadable below 100%. Being a contract - preview is critical. Losing the 150% zoom makes this script prone to getting a lot of complaints.

 

I would much rather prefer to hand over control of the scroll to the user - and I control the zoom size in my script. With all of the funky requirements I have on this script - I can not figure out how to do what I ultimately want - what I have is working - but not optimal.

 

Screenshots in PDF are attached of the script steps and the resulting dialog used for control.Lastly, if anyone can plug any leaks in the script steps or point out what is just wrong - please fire away!

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use