That worked perfectly!

Thanks!

--- In development-axapta@yahoogroups.com, Tom Kim <tp....@...> wrote:
>
> I believe you want to do something like this:
> 
> ledgerJournalTrans_DS.object(fieldId2Ext(fieldNum(LedgerJournalTrans,Dimension),1)).mandatory(true);
> 
> I haven't tested this code, but it should be very close to this. The second 
> parameter allows you the specify the array index for the Dimension field, or 
> any field that's an array field. If you want to evalutate whether the 
> field(s) should be mandatory on a record-by-record basis, then put the code 
> in the "active" method of the LedgerJournalTrans data source.
> 
> Hope this helps. --Tom
> 
> 
> 
> On Apr 15, 2010, 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