web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

mandatory field in DirPartyQuickCreateForm

(0) ShareShare
ReportReport
Posted on by 270

Hi!

I have to make a field from custTable (a field that was added in customization) to be mandatory when the user wants to create a new customer. This is in the "DirPartyQuickCreateForm" form. This field is already mandatory when we edit a customer, but for a new one it doesnt show up in the form.

Has anybody done this before??

Thanks!!

Jorge

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Rachit Profile Picture
    4,015 User Group Leader on at

    Your custom field should be available in the list of fields inside the DirPartyEntity data source on DirPartyQuickCreateForm form. DirPartyEntity is actually referring to CustTable on this form.

    You can define field as Mandatory in the field properties on the form data source.  

    So if your field name is XYZ then you can go to \Forms\DirPartyQuickCreateForm\Data Sources\DirPartyEntity\Fields\AXYZ , right click -> Properties -> Make Mandatory as Yes.

    This will make your field mandatory on this form.

    Hope this helps.

    Thanks,

    Rachit Garg

  • Community Member Profile Picture
    on at

    Requested if you please explain your requirement in more clear way.

    may be by showing screen

  • Batuque Profile Picture
    270 on at

    i configured the field both  as mandatory and visible and still not showing up.

    I had to do besides this, to addthis fields to the table custtable --> field groups ---> quickcreatedetails.

    Thanks very much!

    Jorge

  • Suggested answer
    Sravanthi_Chikotee Profile Picture
    on at
    We can try below in form init event handler.It should work.
     
    [FormEventHandler(formStr(DirPartyQuickCreateForm), FormEventType::Initialized)]
    public static void initializedFormEventHandler(xFormRun _sender, FormEventArgs _e)
    {
            FormRun             formRun = _sender as FormRun;
            FormDataSource      dirPartyEntityDataSource;
            dirPartyEntityDataSource    = formRun.dataSource(formDataSourceStr(DirPartyQuickCreateForm, DirPartyEntity)) as FormDataSource;
            if (dirPartyEntityDataSource.table() == tablenum(CustTable))
            {
                dirPartyEntityDataSource.object(fieldnum(CustTable, #RequiredFieldName)).mandatory(true);
            }
    }
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans