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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Create New Prospect - Set Default Delivery Terms if Country/Region GBR

(0) ShareShare
ReportReport
Posted on by

We are looking at changing the form so we can set the Delivery terms to a certain value if the Country/Region is GBR. The problem I have is that the form DirPartyQuickCreateForm details group of fields are not on the from in the AOT. I think they are created by QuickCreate methods. I have never encountered these so I am lost on how to set the Delivery Terms field as it doesn't appear in the Design on the form. Selecting Personalise on the field and looking at the system name for that field in the form it is called quickCreateDetails_DlvTerm
smmBusRelTable(DirPartyEntity).DlvTerm. Looking at the code it uses the smmBusRelTable and uses a field group called QuickCreateDetails which populates the form with these fields.  But I don't know how to reference these in the methods on the form.

5140.Untitled.jpg

7115.Untitled.jpg

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,273 Super User 2026 Season 1 on at

    Hi Paul,

    You don't have to reference form controls. You need to set the datasource field values.

  • 5400 Profile Picture
    7,162 on at

    \Forms\DirPartyQuickCreateForm\Data Sources\LogisticsPostalAddress\Fields\CountryRegionId\Methods\modified

    public void modified()
    {
        super();
        element.updateControlBasedOnCountry();
        prevCountryRegionId = logisticsPostalAddress.CountryRegionId;
        if (logisticsPostalAddress.CountryRegionId == 'GBR')
        {
            DirPartyEntity.DlvTerm = 'dlv';
        }
    }


  • Community Member Profile Picture
    on at

    We tried something similar as below but get this error everytime:

    (Thanks for the help)

    Error executing code: The field with ID '0' does not exist in table 'smmBusRelTable'.

    Stack trace

    (C)\Forms\DirPartyQuickCreateForm\Data Sources\LogisticsPostalAddress\Fields\CountryRegionId\Methods\modified - line 7

    (C)\Classes\FormStringControl\modified

    public void modified()

    {  

           if (LogisticsPostalAddress.countryregionid=="GBR" && SysCountryRegionCode::isLegalEntityInCountryRegion([#isoGB]))

           {        

               dirpartyentity.dlvterm="EXW";

           }

       super();

       element.updateControlBasedOnCountry();

       prevCountryRegionId = logisticsPostalAddress.CountryRegionId;

    }

  • 5400 Profile Picture
    7,162 on at

    how are you getting 'smmBusRelTable' table, did you add any data source. I did not find any 'smmBusRelTable' table as data source in DirPartyQuickCreateForm. It is working fine in my environment.

  • Community Member Profile Picture
    on at

    no tables added. Searched for smmBusRelTable in the form and no hits. We are on AX2012 R2 and adding a Prospect type which I believe is the link to the smmBusRelTable.

  • Community Member Profile Picture
    on at

    Still stuck on this...cannot find a solution

  • Verified answer
    Community Member Profile Picture
    on at

    We found the answer. We could change the field on the quickcreate part of the form using this code:

    DirPartyEntity.setFieldValue("DlvTerm","EXW");

    element.redraw();

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#1
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#1
Pratik Bhosle Profile Picture

Pratik Bhosle 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans