
Hi
On the "SalesTable" form, there is a button entitled "Generate from template". I understand this button looks for templates that have a primary table of SalesTable.
I would like to add a button to the action pane that sits about the sales line grid that looks for a primary table of SalesLine.
The steps I have followed so far:
I copied the button "mbTemplatesButton" from the sales order header to the Action Pane Tab above the sales line grid. I changed the name of the two buttons to "mbTemplatesButtonSalesLine" and "DocuActionTemplateUndefinedSalesLine".
I added this code to the "classDeclaration" method:
boolean isDocuActionTemplateSalesLine;
I added this code to the "init" method:
isDocuActionTemplateSalesLine =
DocuActionForTemplate::createTemplateOnMenuButton(
mbTemplatesButtonSalesLine, salesLine.TableId);
And this to the "run" method:
docuActionTemplateUndefinedSalesLine.visible(
!isDocuActionTemplateSalesLine);
What I am finding is that the "Generate from template" button on the header disappears!
And the "No templates defined" still appears when I click my new button, but my document template I have already created and configured does appear correctly.
What am I doing wrong!?
Many thanks in advance
*This post is locked for comments
I have the same question (0)