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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Possible to change minoccurs and maxoccurs in a AX schema?

(0) ShareShare
ReportReport
Posted on by

Hello all,

 

I have a question regarding minOccurs and maxOccurs in XSD schemas generated by AX 2012 R2. By default, all element nodes (not values) are always considered to use minOccurs = 0 and maxOccurs = "unbounded", I have created a sample query (designed for a outbound document) to illustrate this.

This query based on CustTable has two sub data sources, CustTrans and CustGroupInfo. CustTrans is set to FetchMode = 1:n/JoinMode = OuterJoin and CustGroupInfo is set to FetchMode = 1:1/JoinMode = InnerJoin.

5584._5F00_image02.png

When I view the schema, both CustTrans and CustGroupInfo are set to minOccurs = 0 and maxOccurs = unbounded.

 

The "most" logic thing here would be that CustGroupInfo is set to minOccurs = 1 and maxOccurs = 1.

 

Is it possible to override this behaviour from the query in the document classes and set minOccurs and maxOccurs manually?

 

Kind regards,

Tobias

*This post is locked for comments

I have the same question (0)
  • Dick Wenning Profile Picture
    8,705 Moderator on at

    no because we have a 1 to N relation.

    also mandatory field is not possible

  • Community Member Profile Picture
    on at

    What to do you mean by "mandatory field is not possible"? We can use Document Data Policies to set Required (minOccurs = 1) for fields, the issue here is that I can not do the same with the nodes.

    I can understand the fact that FetchMode does not really have to do with the 1/n relation in the XSD schema, but is it in that case possible to require a node in a outgoing schema?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans