We have a custom vendor creation form but needed it to behave similarly to the standard VendTable form when creating a new vendor and selecting or creating a party. In order to do this you need to join 'DirPartyTable' to your master record table as datasources in the form, add the 'DirPartyTable' name field as a control and then add the following code.
On 'init' of the form, initialize the variable and setup the parms:
On 'createRecord' of the form:
I comment out super as my form is for creation only.
And finally, you will need this parm method in order for the selected 'DirPartyTable' record to come back to your datasource:
That's it! You can now use the full functionality of looking up 'DirPartyTable' records by name.