SBX - Search With Button

SBX - Forum Post Title

Customize duplicate menu item for purchase order form

Microsoft Dynamics AX Forum

ShubhAX asked a question on 12 Jul 2018 3:46 AM

Question Status

Unanswered

I am brand new to AX development, 

I have issue regarding purchase order customization, the details are: I have created duplicate purchase order form by using duplicate on menu items, i have also set the filter for my custom data, now standard and duplicate have different view when open through different menu item. Now i want to implement a functionality that if we open duplicate purchase order and do modification on form level, data source level or control level, it should be restricted to custom menu item form where the duplicate purch order form is opening. 

For creating duplicate of standard form, i have done modification on form class declaration, init and execute query() method on datasource level. 

Please help me out. Thank you !

Reply

Hi ShubhAX,

Unfortunately, I cannot understand your question. Can you describe in detail the business requirement, the attempts you have done and where exactly you need help?

Reply
ShubhAX responded on 12 Jul 2018 5:25 AM

Hi Andre, The business requirement is create separate purchase order for new product. So what i done is using standard purch table form, create a duplicate menu item for this and in add range on form to open in customized view where no other records visible on Purchase order form i.e on purchase order line header.

Procedure - Dragged purcTable form to new menuitem and create duplicate of it > added range. 

codes- 

    QueryBuildRange                 queryBuildRangeABC;

queryBuildRangeFleet  =  this.query().dataSourceName('PurchTable').addRange(fieldnum(PurchTable, ABCOrder ));

if(element.args().menuItemName()==menuitemDisplayStr(ABCTable))
{
queryBuildRangeABCt.value(queryValue(NoYes::Yes));
}

I have added an custom enum NoYes field on Purch table, declared QueryBuildRange in form, and add range initialize the range at init method on purchTable_ds and then added query value on executeQuery(). It works fine and the forms shows no record.  

"Now i want an implementation that if we make many change on form for custom entries on purch order lines , the modification should be bounded to duplicate menu item only and any modification on form may not reflect to standard form run process."

For ex- if  we modify the itemName filed on purchline_ds or any other development the changes should only restrict to new menuitem form i.e dupilcate type of standard form.

Reply

why you duplicated standard form ? What is the business scenario here? Since your duplicate form is acting on same undelaying tables , if you open standard form those changes should be visible for the changed Purchase orders

Reply

SBX - Two Col Forum

SBX - Migrated JS