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)

Trouble in fetching new location role logisticslocationRoletype enum in coding

(0) ShareShare
ReportReport
Posted on by 1,307

Hi,

LogisticsLocationRole table is used for creating addresses for customers.

I added a new location role to LogisticsLocationRole for our customers and I have a problem in using it for coding.

Logistics-Location-Role.png

I tried to see the value from AOT\Data Dictionary\Tables\LogisticslocationRole table.

LogisticsLocationRole-table.png

here, the type of this new location role is "user Defined". This is a default value and it cannot be changed. But I have to change it to VASAltDLV to fetch VASAltDlv record. The record I am creating in the form is not taking the label from the VASAltDlv ENUM instead it is by default showing as "User Defined" only.

In logisticsLocationRoletype, the Enum "None" , label is also "user Defined".

LogisticsLocationRoleType.png

So when I am trying to fetch VASALtDlv record, the system is giving me None Record information as both labels are "User Defined".

LogisticslocationRole-VASAltDlv-Job.pngVASAltDlv-Debugging.png

help me how to rectify this situation so that system can take the label information in ENUm as type in table.

Thanks,

lakshmi

*This post is locked for comments

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

    Hi Lakshmi,

    If you have added the enumeration, you should also update the type in your new Role record.

  • Lakshmi Karambakkam Profile Picture
    1,307 on at

    In my system, the type field is uneditable in the LogisticsLocationRoletable. So I am not able to change/edit it.

    Is there any other way of editing it? In your AX instance, is it editable or uneditable?

  • Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    First of all, avoid using the same label for two enum elements. Users wouldn't be able to distinguish between them.

    By the default, rule types created by users are "User defined" (LogisticsLocationRoleType::None). If you want different logic, you'll have to implement it. If users should be able to use both None and VASAltDlv, you'll have to give them a way to choose. If you want to always use VASAltDlv instead of None, what the advantage against simply using None?

  • Verified answer
    André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at

    Hi Lakshmi,

    The roles out of the box are created during installation and usually there is no need to change the type. If you now need another value, you could change it using a script or in the database. Probably you can add logic that it will insert a role with your type also during the installation/setup.

  • Lakshmi Karambakkam Profile Picture
    1,307 on at

    Thanks Andre. Inserting through code was simple and effective solution. It worked out. thanks a lot.

  • Suggested answer
    Community Member Profile Picture
    on at

    Just for completeness how to add a new system type for postal addresses, as I was also looking for the way in doing it here some further notes:

    - Add new enum entry to LogisticsLocationRoleType i.e. CollectionLetterWPC

    - under AOT\Resources\LogisticsLocationRoleData export the XML and put your new type in the exported file

    ...

    <Item>

     <Field IsTranslated="False" Name="Name">@SYS13960</Field>

     <Field IsTranslated="False" Name="Type">CollectionLetterWPC</Field>

     <Field IsTranslated="True" Name="Description">@SYS13960</Field>

     <Field IsTranslated="False" Name="IsPostalAddress">Yes</Field>

     <Field IsTranslated="False" Name="IsContactInfo">No</Field>

    </Item>

    ...

    - Import the changed xml in the resouce LogisticsLocationRoleData

    - Create a new job to load the new value

    static void createLogisticsLocationsRoles(Args _args)

    {

       ;

       DirDataPopulation::insertLogisticsLocationRoles();

    }

    - As last step. In case you don't like the Name you can change it using table browser on LogisticsLocationRole

    Hope this helps

    tom

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans