Virtual Coding refers to the ability to create and use functions that change data or perform functions when fields on an object change, when a custom button is clicked, or when a workflow runs. Virtual Code functions can also be developed by third party developers and incorporated into existing applications and plug ins.
Permissions are required for Setup and Virtual Coding.
A virtual function can be created for an object by a PerfectMind user, or come pre-coded and be included with an object or application or custom block. Virtual functions can be created and used in all objects. A function can be made to run by attaching it to a custom button so the function runs when the button is clicked, or it can be run when the information in one or more fields on the object is changed, such as a user editing the information, or it can be used in a workflow as the action for the workflow. Because the virtual code can be used in these different ways
This allows you to select a related child (dependant) object and delete records from that object. An object must have child objects linked to it to use this function. You need a field on the parent object (the object the virtual code is being created on) to specify how many records will be deleted from the child object.
This allows you to select up to six columns (fields), add the values in those fields together, and display it in a different field. This can be useful for doing calculations or estimates and seeing the results by clicking a button, rather than having to use a formula field and save the record each time to show the calculation.
This allows you to select fields for the different amounts, values, or records to create a transaction automatically. For example, if the user clicked a "Complete Order" button, it could run a workflow that automatically creates a billing record for a customers purchase based on the existing customer information and the information entered for the order transaction. The Show Popup option lets the user select and fill in this information themselves instead of having it all happen in the background.
This allows you to select up to six columns (fields), multiply the values in those fields together, and display it in a different field. This can be useful for doing calculations or estimates and seeing the results by clicking a button, rather than having to use a formula field and save the record each time to show the calculation.
This allows the user to automatically create a specific event that occurs more than once. The type of occurrence, start time, end time, and other details can be selected from the fields on the object and the event will be created. This can save time by quickly creating events in the Planner without having to load the Planner, create a new event, and so on.
This allows you to select up to six columns (fields), subtract the values in those fields together, and display it in a different field. This can be useful for doing calculations or estimates and seeing the results by clicking a button, rather than having to use a formula field and save the record each time to show the calculation.
Virtual functions are available for all objects. If you create a function in an object, that particular functionality will only be in the object itself.
To create a virtual function, start from Setup > Development > Objects. Select the object you want to work with.
Click the Virtual Coding tab. If there are other functions they will be in a list.
Click the New button.
Enter a Name for the function. It should be descriptive of what the function does or is used for.
Enter a Description for the function so that other users will know what the function does.
If you want the function to be triggered by a change in one or more fields on the object, select the field(s) from the list. The function will run immediately upon the field being changed, such as when a user is editing the field or a formula is being updated.
To define the function and what it does, click the New button.
Select the Function Name from the drop down list. This determines what the function will do.
Add Values: For numeric fields only. Add all of the values from the selected input fields and put the result into the selected output field.
Create Transaction: Select the fields that have the details for the transaction that will be created (amount, finance information, etc.). If you select "Show Popup" the application will show a window with the transaction details for the user to see. This allows them to change transaction details, use the Pay Now or Pay Later options when creating the transaction, and check the transaction details before it is created. You can also select an output field to show the result of creating the transaction.
Multiply Values: For numeric fields only. Multiply all of the values from the selected input fields and put the result into the selected output field.
Recurrence: Create a repeating event or transaction (e.g. a regular monthly payment). Fill in the details for the event or transaction. The output for the Result Recurrence field is an Id number for the event created. The Recurrence Description shows up in the event's description field. You can create new labels for the Start Date and End Date fields for the recurrence information if you want. For example, you may want to have "First Payment Date" and "Last Payment Date" instead.
Subtract Values: For numeric fields only. Subtract all of the values from the selected input fields and put the result into the selected output field.
From the Input list, select one or more columns for the input values for the function. If the object is related to other objects, such as a Customer object related to an Invoice object, click on the object's name in the list to see the related objects. You can then choose a related object and pick a field from that object for the virtual function as well.
In the Output list, select where the results of the function will be displayed.
Click OK.
To keep adding to the function, click the New button again, and repeat steps 7 through 10. The functions will run in the same order as the list, from top to bottom. This means that one function can produce a result, and the next function in the list can use that result for it's own use. For example, the first function could add two fields together, then a second function could multiply the result of the first function by another field, and so on.
Click Save to finish.
Note that you can create functions with custom buttons instead of using the fields from the object to run the function. From the Custom Button tab, create a new button, add a new action, and select the Virtual Code option from the list.
Create a Custom Button
Did you find what you were looking for? Yes No
Did this help you? Very Helpful 5 4 3 2 1 Not Helpful
How can we improve this topic?
Send Feedback: