Can system choose printable forms according to some conditions
We use different templates of documents to different types of business and services.
And how we can use conditions?
For example:
How we can define that if type of business 'b2b' (at contragents card) then system should print "form №1", else - "form №2"?
Or if type of product "internet" at printable form choose "1 static IP", else "_"?
Thank you, for you support!
Like
Dear Alexander,
You can make the field visible or hidden if the printable meets some conditions with the help of the development tools only. Please use the following script as an example for further investigation. It hides a form depending on a field value (if it’s less than 350 000 in this case) and you can alter it to reach your aim:
define("OpportunitySectionV2", ["VisaHelper", "LookupUtilities", "BaseFiltersGenerateModule", "css!VisaHelper"], function(VisaHelper, LookupUtilities, BaseFiltersGenerateModule) { return { entitySchemaName: "Opportunity", attributes: {}, methods: { preparePrintFormsMenuCollection: function(printForms) { this.callParent(arguments); printForms.eachKey(function(key, item) { if (item.values.Caption === "Quotation" && this.get(“Amount”)<350000 item.set("Visible", false); } }, this); } }, diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/ }; });
Please also note that such idea has been registered for our R&D team to include the functionality in the upcoming releases in the out-of-the-box version.
Best regards,
Lily