18.11.2011, 16:11 | #1 |
Участник
|
workflowax: ‘Go to Origin’ Button for Workflow History Form
Источник: http://workflowax.wordpress.com/2011...-history-form/
============== For workflow administrators out there, you have no doubt found the need to jump from the workflow history form (Basic -> Periodic -> Workflow History) to the original document that the workflow relates to. Especially for debugging errors. So today’s post provides you with just that… A “Go to origin” button for your workflow history form. Go to origin button on workflow history form Seeing as this is a standard AX form, I don’t think I’m allowed to simply export and provide an XPO on my blog so here are the instructions on how to do it. 1. Open the form WorkflowStatus in the AOT. 2. Create a standard button at the following location on the form Designs -> Design -> Group -> GridGroup -> Button group called DrillDown with the label @SYS88047 in its text property. Insert Button 3. Right click on the button’s method node, click Over ride method , Clicked. 4. Overwrite the method code with the following. void clicked(){ Common buffer; selectableDataArea company = curExt(); Args args = new Args(); SysDictTable dictTable; FormRun formRun; WorkflowTrackingStatusTable trackingStatus; ; trackingStatus = WorkflowTrackingStatusTable::findByCorrelation(WorkflowTrackingStatusTable.CorrelationId); if (trackingStatus.RecId) { changecompany(trackingStatus.ContextCompanyId) { dictTable = new SysDictTable(trackingStatus.ContextTableId); buffer = dictTable.makeRecord(); select buffer where buffer.RecId == trackingStatus.ContextRecId; if (! buffer) { info('You cannot go to the origin of the workflow instance. The record no longer exists or you do not have sufficient access.');return; } dictTable.formRef(); args.lookupRecord(buffer); args.name(dictTable.formRef()); formRun = ClassFactory.formRunClass(args); formRun.init(); formRun.run(); formRun.detach(); } }}If you cannot read the above you can view it in this text file: clickedWF.txt 5. Save the form. 6. You’re done!! Quick and easy. Disclaimer: Please note that this is really just an code suggestion and that you should test it thoroughly before introducing to any live environment. Источник: http://workflowax.wordpress.com/2011...-history-form/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|