Показать сообщение отдельно
Старый 23.11.2018, 17:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,646 / 848 (80) +++++++
Регистрация: 28.10.2006
alirazazaidi: Avoid Over layering in Development of Workflows on Existing Form Extension version – Dynamics 365 for finance and operations
Источник: https://www.tech.alirazazaidi.com/av...nd-operations/
==============

Hi all,  My fellow Sohail Shaikh wrote an excellent blog Post, I used it in my customization to avoid overlay methods in some of out of the box table.

http://d365technext.blogspot.com/201...opment-of.html





That article made my day and worked perfectly fine. But here one thing that article missed.  How we have to set form designer the custom workflow in list page . Something like If I copied from Sheiks sabs article.







There is error when I created on initialized of custom table in a extension class for list page . I got following error.







So it is not possible, I still not figure out. Later possible I will got they way to do so. Any how I achieved this in extension for interaction class.  I copied the  post event of initializeQuery method and copied in my class and following code will work for me. To enable or disabled workflow in list page


[PostHandlerFor(classStr(TableListPageInteraction), methodStr(ListPageInteraction, initializeQuery))]

public static void TableListPageInteraction_Post_initializeQuery(XppPrePostArgs args)

{

TableListPageInteraction TableListPageInteraction = args.getThis();

StatusTable RFQStatusTable = purchRFQCaseTableListPageInteraction.listPage().activeRecord(queryDataSourceStr(TableListPage, DDSRFQStatus)) as DDSRFQStatus;

FormRun formRun = TableListPageInteraction.listPage().formRun();



FormRun.design().workflowDatasource(formDataSourceStr(PurchRFQReplyTable, DDSRFQStatus));

FormRun.design().workflowEnabled(true);

FormRun.design().workflowType(workflowtypeStr(DSSRFQCaseWFType));



}

It works for me





Источник: https://www.tech.alirazazaidi.com/av...nd-operations/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.