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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Custom form with join to 'DirPartyTable' shows 'SysClientPolymorphicCreateSelector'

(3) ShareShare
ReportReport
Posted on by 3,155
I have custom form to create a new custom master record.  The 'Name' on this master record relationship to the DirPartyTable. 
In order to create this new master record I have joined 'DirPartyTable' in the form so I can lookup an existing party or create a new one.
Whereas my master record table datasource has 'Insert if empty' set to yes, it is attempting to insert a new record when opening the form.
This is fine, however, it seems to want to create a new 'DirPartyTable' record as it pulls up this screen:
I was attempting to mimic Vendor creation but I'm not sure why this form is being pulled up.
Categories:
I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    236,570 Most Valuable Professional on at
    Custom form with join to 'DirPartyTable' shows 'SysClientPolymorphicCreateSelector'
    You need to decide what you want to happen when creating a record. For example, you may want to automatically create a specific party type, such as a person.
     
    How it's done with vendors may be more compex than necessary in your scenario, but it's worth checking how it works.
     
    There you can select the type of party directly in the form:
     
     
    Notice that the form utilizes DirPartyFormHandler class to handle these things. Namely, DirPartyFormHandler_Entity.create() tells the form data source which type to use, by using its createTypes() method. But there is a plenty of other logic, e.g. because persons have different fields than organizations, you may want to use an existing party, only some party types are allowed there, there is a default party in parameters and so on.
  • b_radlyjames Profile Picture
    3,155 on at
    Custom form with join to 'DirPartyTable' shows 'SysClientPolymorphicCreateSelector'
    Martin,
     
    Thank you!  This really helped.  For those looking at this, in order to get this going you need the 'partyForm' variable, initialized in the 'init' method of the form, ', call 'initValue'' and 'create' in the 'createRecord' method of the form, and the 'parmPartyForm' method.
     
    This will allow you to lookup the DirPartyTable record by name and return that record, if selected, back to your datasource.
     

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,771

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 806 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 542 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans