How to use OOTB 'Create Merge Document' in Repeating Grid?
We use Correspondence Page list
.TestList(2) and so on. Number of pages dynamically change based on the user inputs. For each page, we need to provide the user with OOTB "Create Merge Document" button. When the user clicks, corresponding word document should be generated and replaced with pega reference values.
Steps followed but unsuccessful for multiple letter generations:
1. Created new section which has repeating grid layout
2. Created HTML control and added the source code similar to OOTB 'CreateMergedWordDoc' section
3. Had issues with pxObjClass. I've copied the Word templated under the same class where Correspondence List property is available that resolved finding the correct Rule-Template-Word instance
4. WorkHandle parameter is null at runtime which is used by Activity 'getPropertyInsert' (Hardcoded with sample pzInsKey value
5. On Clicking first 'Create Merge Document' button, word document generated successfully and pega references replaced. Whereas, clicking second 'Create Merge Document' button it does nothing.
We are using IE11 browser. Please provide your thoughts on how to make use of OOTB Create Merge feature in repeating grid without any issues. Thanks.
Modified OOTB rules:
1. CreateMergedWordDocControl (New control similar to CreateMergedWordDoc SECTION) referred in the repeating row
From a brief review of these they seem designed to configured to operate in a one per form fashion given specific IDs and other elements of the layout ( you can verify if this is indeed the case by trying to include two of your control on the screen independent of the repeat grid). Is it possible you could achieve your requirement by having a single button and the user select a item in a list via checkbox or dynamic select to generate the document?
Yes. I've tried using two different sections independent of each other by making use of the control, the system assumes there is only one Create Merge button and does not perform anything on the second button. Its designed to handle only once in any given screen. The other approach using dynamic select mentioned by you could be the last option if we don't have any other alternate solution. We are also working on Modal dialog approach for multiple letter generation.