Hi Friends,

i am new to the axapta

i have a form this form having the fields(Order id, Order Description , OrderDate , Priority ,ExpiryDate )

priority having enum fields like Vital,Desirable,Expansible Look up fields

My Requirement is when i am selecting the vital priority Expiry= OrderDate>=Expirydate<=Orderdate+7 ,

if i select Desirable Expiry=OrderDate>=Expirydate<=Orderdate+15,

if i select expansible Expiry=OrderDate>=Expirydate<=Orderdate+30,

by default orderdate=systemdate please send solution with coding urgently

Hi Sreenu,

Write code in Active method of datasource.

YourTableName.OrderDate = SystemDateGet();

If(YourTableName.Priority == Priority::Vital)


YourTableName.ExpiryDate == OrderDate>=Expirydate<=Orderdate+7;


elseif(YourTableName.Priority == Priority::Desirable)


YourTableName.ExpiryDate = OrderDate>=Expirydate<=Orderdate+15;


elseif(YourTableName.Priority == Priority::Expansible )


YourTableName.ExpiryDate = OrderDate>=Expirydate<=Orderdate+30;


Note: wirte Base enum in place of Priority that u have use .

hi sreenu,

write the code which rajkumar sent in priority field modified method in datasource fields, and in data source active method, if u modify the field…

once again after opening the form…