Just to share with the group, this is a solution that was suggested to me and 
that worked:

ledgerJournalTrans_DS.object(fieldId2Ext(fieldNum(LedgerJournalTrans,Dimension),\
1)).mandatory(true);

Thanks!

--- In Axapta-Knowledge-Village@yahoogroups.com, "www_programmer" 
<www_program...@...> wrote:
>
> I have a formcontrol combobox that allows you to select from 
> ledgerJournalTrans.Dimension. The three dimensions from the Enum are 
> displayed on the form at textboxes inside of a group. They were placed on the 
> form as a fieldgroup.
> 
> I have set the AutoDeclaration to Yes for all of them. They have the names: 
> Dimension1, Dimension2 & Dimension3 in their control properties.
> 
> When I go to set the mandatory settings directly in their form properties, I 
> get the expected red wavey line. But when I try to set it in code, which is 
> what I want to do, I don't get the option to set the property mandatory.
> 
> I try this code:
> element.control(Control::Dimension1).
> 
> But, .mandatory(true) is not an option. If I try 
> element.control(Control::Dimension1).visible(false);
> The correct element will be invisible. So, I'm not sure why I can't set 
> mandatory.
> 
> Thanks for the help.
>


Reply via email to