selections based on options....[Help Needed]

sathangaisathangai Member Posts: 25
Hi all,...

iam new to navision...

in my form i have two fields(one is option field and another normal).Based on the option chosen the 2nd field has to be enabled.
say...
in the contact card table i've taken 'Action Like Filter' field(changed option,opt ml)to my own values say (,new,existing) and 'first name' field to display client list.

if i choose 'existing' then the firstname has to be enabled else not enable.

is there any modifications need to be done for the exisiting fields? or is there any code needs to be written? plz help me..

i got error when coding like (type conversion,boolean := text,etc.....)

iam new and i will learn with the replies...

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    Take a look at the item card and the replenishment fields.
    David Singleton
  • sathangaisathangai Member Posts: 25
    thanks David,

    still i can't,.. in the replinishment system i have two choices..(Purchase,Prod.order).but where is the code i have to see ie..in form level,2 functions were used..(enableplanningcontrols,enablecostingctrls).how can i set or how it was set
    EnablePlanningControls()
    PlanningGetParam.SetUpPlanningControls("Reordering Policy","Include Inventory",
    ReorderCycleEnabled,SafetyLeadTimeEnabled,SafetyStockQtyEnabled,
    ReorderPointEnabled,ReorderQuantityEnabled,MaximumInventoryEnabled,
    MinimumOrderQtyEnabled,MaximumOrderQtyEnabled,OrderMultipleEnabled,IncludeInventoryEnabled);
    CurrForm."Reorder Cycle".ENABLED := ReorderCycleEnabled;
    CurrForm."Safety Lead Time".ENABLED := SafetyLeadTimeEnabled;
    CurrForm."Safety Stock Quantity".ENABLED := SafetyStockQtyEnabled;
    CurrForm."Reorder Point".ENABLED := ReorderPointEnabled;
    CurrForm."Reorder Quantity".ENABLED := ReorderQuantityEnabled;
    CurrForm."Maximum Inventory".ENABLED := MaximumInventoryEnabled;
    CurrForm."Minimum Order Quantity".ENABLED := MinimumOrderQtyEnabled;
    CurrForm."Maximum Order Quantity".ENABLED := MaximumOrderQtyEnabled;
    CurrForm."Order Multiple".ENABLED := OrderMultipleEnabled;
    CurrForm."Include Inventory".ENABLED := IncludeInventoryEnabled;

    EnableCostingControls()
    CurrForm."Standard Cost".ENABLED := "Costing Method" = "Costing Method"::Standard;
    CurrForm."Unit Cost".ENABLED := "Costing Method" <> "Costing Method"::Standard;
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • garakgarak Member Posts: 3,263
    Lets say you have a option field "MyOptionField" with the options: " ,option1,option2,option3,option4"

    Now the control "No." on your form should be editable if the value of "MyOptionField" is option1 and the control "Description" should be enabled if the value of MyOptionField is between option2 and option3.
    EnableControlsByMyOptionField()
    CurrForm."No.".ENABLED(MyoptionField = MyOptionfield::Option1);
    CurrForm.Description.enabled(Myoptionfield in [Myoptionfield::option2..Myoptionfield::option4]);
    
    MyOptionfield - OnAfterValidate()
    EnableControlsByMyOptionField();
    
    Form - OnAfterGetRecord()
    EnableControlsByMyOptionField();
    

    If you need to add your own options to an standard option field or option variable, put them not at the begin! Put them at the end after some ",".

    Like: per default the value of StandardoptionField is: " ,optionvalue1,optionvalue2,optionvalue3"
    Now, you need also optionvalue4,optionvalue5,optionvalue6. So add them like: " ,optionvalue1,optionvalue2,optionvalue3,,,,,,,,,,optionvalue4,optionvalue5,optionvalue6"

    <- so you have no problems, if in a upgrade to a new Version the optionfield has new options
    Regards
    Do you make it right, it works too!
  • sathangaisathangai Member Posts: 25
    Thank u Garak.....

    i'll try n let u know what happened...
Sign In or Register to comment.