[Axapta-Knowledge-Village] How to make a field mandatory at runtime

2004-10-13 Thread ottawa_m2003
Hi, I am trying to make Costcenter dimension field mandatory in PO lines. I have two types of Items say A and B. A requires Costcenter mandatory, but B does not require mandatory. I wrote this code. But its not working. 1. I made the field as mandatory in the form. I override validate

Re: [Axapta-Knowledge-Village] How to make a field mandatory at runtime

2004-10-13 Thread akash malohatra
--- ottawa_m2003 [EMAIL PROTECTED] wrote: Hi, u can write this code in the Datasource -PurchLine- Itemid - modified() method if(PurchLine.itemid = A) { PurchLine_ds.object(fieldid2ext(fieldNum(PurchLine, Dimension), 2)).mandatory(true); } else {

Re: [Axapta-Knowledge-Village] How to make a field mandatory at runtime

2004-10-13 Thread [EMAIL PROTECTED]
Cool ... Thank you Akash.akash malohatra [EMAIL PROTECTED] wrote: --- ottawa_m2003 [EMAIL PROTECTED] wrote: Hi,u can write this code in the Datasource -PurchLine-Itemid - modified() methodif(PurchLine.itemid = "A"){PurchLine_ds.object(fieldid2ext(fieldNum(PurchLine,Dimension),