[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 
method with the following code on the StrEdit::dimension[2] in the 
grid..


boolean validate()
{
boolean ret;
if ( this.ItemID == 'A' )
 this.mandatory(true);
else
 this.mandatory(false);

}

But it seems not working. Can anyone tell me how to 
make costcenter ( column ) in the form mandatory at runtime with 
respect to PO lines ( rows ) of the form.

Appreciate your help.
thanks,
Ottawa





 Yahoo! Groups Sponsor ~-- 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/kGEolB/TM
~- 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





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
{
PurchLine_ds.object(fieldid2ext(fieldNum(PurchLine,
Dimension), 2)).mandatory(false);
}

cheers
Akash
-

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 
method with the following code on the
StrEdit::dimension[2] in the 
grid..


boolean validate()
{
boolean ret;
if ( this.ItemID == 'A' )
 this.mandatory(true);
else
 this.mandatory(false);

}

But it seems not working. Can anyone tell me how to 
make costcenter ( column ) in the form mandatory at
runtime with 
respect to PO lines ( rows ) of the form.

Appreciate your help.
thanks,
Ottawa





Sharing the knowledge on Axapta.


Yahoo! Groups Sponsor  ADVERTISEMENT
 

-
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
 
   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
 
   Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.
 





___ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://uk.messenger.yahoo.com


 Yahoo! Groups Sponsor ~-- 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/kGEolB/TM
~- 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





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), 2)).mandatory(true);}else{PurchLine_ds.object(fieldid2ext(fieldNum(PurchLine,Dimension), 2)).mandatory(false);}cheersAkash-Hi,I am trying to make Costcenter dimension fieldmandatory in PO lines.I have two types of Items say A and B. A requiresCostcenter 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. Ioverride validate method with the following code on theStrEdit::dimension[2] in the
 grid..boolean validate(){boolean ret;if ( this.ItemID == 'A' ) this.mandatory(true);else this.mandatory(false);}But it seems not working. Can anyone tell me how to make "costcenter" ( column ) in the form mandatory atruntime with respect to PO lines ( rows ) of the form.Appreciate your help.thanks,OttawaSharing the knowledge on Axapta.Yahoo! Groups Sponsor ADVERTISEMENT-Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/Axapta-Knowledge-Village/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the
 Yahoo!Terms of Service.___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.comSharing the knowledge on Axapta. __Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com 


Sharing the knowledge on Axapta.








Yahoo! Groups Sponsor















Select Your State:
Alabama
Alaska
Arkansas
Arizona
California
Colorado
Connecticut
Delaware
Florida
Georgia
Hawaii
Idaho
Illinois
Indiana
Iowa
Kansas
Kentucky
Louisiana
Maine
Maryland
Massachusetts
Michigan
Minnesota
Missippi
Missouri
Montana
Nebraska
Nevada
New Hampshire
New Mexico
New Jersey
New York
North Carolina
North Dakota
Oklahoma
Ohio
Oregon
Pennsylvania
Rhode Island
South Carolina
South Dakota
Tennessee
Texas
Utah
Vermont
Virginia
Washington
Washington D.C.
West Virginia
Wisconsin
Wyoming

Purchase
Refinance

















Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/Axapta-Knowledge-Village/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.