AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.11.2011, 16:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
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, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
workflowax: Why does my Submit button keep showing? Blog bot DAX Blogs 0 09.05.2011 21:12
workflowax: Security Keys for Workflow History Blog bot DAX Blogs 0 22.12.2010 12:11
emeadaxsupport: The AIF Document History form takes too long to open and/or hangs the AX client Blog bot DAX Blogs 0 09.11.2010 19:10
CRM DE LA CREME! Some more useful javascripts for MS CRM Blog bot Dynamics CRM: Blogs 0 04.05.2010 11:05
CRM Programmer: Remove 'Add Existing...' button from associated view entities form Blog bot Dynamics CRM: Blogs 0 13.08.2009 15:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 04:15.