Creating a Document Query with the PV0 Parameter in Docs Made Easy
PV0, or Parameter Value Zero, is a critical parameter within Docs Made Easy.
Using the parameter, the app returns data specific to the record you are working with.
For example, if you are gathering Contacts with a query, rather than returning ALL Contacts in your Salesforce org, pass the ID of the master record into the pv0 filter on the query so that only Contacts related to the record you are working with are returned and merged into the document.’
This feature empowers Docs Made Easy to return data specific to the record you are currently working with, revolutionizing how data is extracted and merged into your documents.
Functionalities of PV0:
Record-Specific Data Retrieval: PV0’s primary function is to filter and retrieve data that is directly related to the master record ID. Instead of returning all data, PV0 allows you to focus on the specific record you are working on.
Dynamic Query Filters: PV0 enables dynamic query filters, ensuring that the data pulled into your documents is always up-to-date and tailored to the context of the master record.
Users must use the pv0 parameter to run the query while adding dynamic filters in a query.
If there are multiple filters, then parameter values will be referenced as pv1,pv2, and pv3 going upto N numbers.
Steps to Create a document using the PV0 parameter in Docs Made Easy
Log in to the salesforce from your account.
Click on App Launcher Now, in the search box, type Docs Made Easy.
We are creating a Custom button.
First move to the Document Setup.
Click on the “Launch Wizard ”to create a button for your personalized templates for document generation.
Now you will see the screen Here, you need to Add Solution Details which are the names of your custom buttons.
To create a new query, just click on the “ Create New Query ”button.
Clicking on the Create New Query button will take you to a new tab where you can add the details of your query. Add the query name. Primary Object, and hit the next button.
Now, you will see that your Query has been Created.
Here, You can add the Parameter in the query Where id ='{pv0}’
Now the query you just created will reflect under soal queries. However, you need to type the unique Alias Then, click on the next button.
Add Template Page. Now click on the Next button.
Assign Behaviour Page. Go to the Query Parameter section.
Now, Click on the Add Parameter.
Add the query parameter and click on the save button.
Click on the next button
Now take you to the final step, that is add a button to Page Layout. Now move as directed and click on Go to the Page Layouts button.
Now a different tab will show you the “Page Layout”. Here click on the Account Layout that you just created.
Here, click on the “Mobile & Lightning Actions” button, and find the button you just created.
After that, you need to just Drag and Drop that button beside “Post” in Salesforce Mobile and Lightning Experience Actions.
Click on the save button.
Here, open an account that you want to and click on the button you created.
At this step, you should click on the Build Your Own Button.
In the bottom Left side, Your Query has been shown.