Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

How to make location field non mandatory in EP2012 expense line

$
0
0

Hi,

  I have modified the Location field mandatory to false.

private void SetPropertiesOnBoundFields()
    {
        ApplicationProxy.TrvExpType expenseType = this.ExpenseType;
        bool insertMode = (this.AxFormOverview.Mode == DetailsViewMode.Insert);

        foreach (DataControlField dcf in this.Group_Transaction.DataControlFieldCollection)
        {
            AxBoundField boundField = dcf as AxBoundField;
            if (boundField != null)
            {
                switch (boundField.DataField)
                {
                    case "ExchangeCode":
                        boundField.AutoPostBack = true;
                        boundField.FastTabSummary = FastTabSummary.Yes;
                        break;

                    case "CreditCardTransactionCurrency":
                        if (this.IsCreditCardTransanctionInLocalCurrency)
                        {
                            boundField.AutoPostBack = true;
                            boundField.FastTabSummary = FastTabSummary.Yes;
                        }
                        break;

                    case "DeduktionBreakfest":
                    case "DeduktionLunch":
                    case "DeduktionDinner":
                    case "Location":
                        boundField.AutoPostBack = true;                        
                        boundField.Mandatory = false;           
                        break;

its reflecting in new expense Line Form with out non mandatory but when i click save it showing field location must be filled in.

Location field not mandatory in trvexptrans table and Dataset .suggest how to make location field  non mandatory.

Thanks

Dhanasekar


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>