Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Restriction on Item for zipcode,city,county,Zipcodegroup

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

 Hi all,

I want to add a restriction on a item for sell.

In standard ax,only restriction for coutry and state is available,I want it for zipcode,city,county.

I had added the fields,in PDSMRCREstriction list form and by item form.

what modifications in the code should I do to get a info thrown for restriction added for particular item in the restriction list.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Restriction on Item for zipcode,city,county,Zipcodegroup

    Hi Steven,

    I had created a new form Zip/postal code groups,in which the Zip/postal code group is a group of zipcodes for particular selected state or country,so the purpose is to block a certain group of zip codes together.

    I am sorry I dint mention it,even this field Zip/postal code group is added in the PDSMRCRESTRICTION list form & zip/postal code field is blocked when  Zip/postal code group is filled in.

  • Weaveriski Profile Picture
    Weaveriski 23,616 on at
    RE: Restriction on Item for zipcode,city,county,Zipcodegroup

    I am aware what AX does and this is sufficient for most businesses I would argue. You have not told me the business justification for it.

    Lets say you want to put this into the UK, there are 1.8 million postcodes, theoretically which business will spend the time to go to this level per customer? The aim of the AX standard is to prevent you sending bannned goods to a region whilst giving you the ability to sell to other regions. Having it on postcode seems to add little benefit, for one customer with 100 delivery address you are saying allow delivery in 20 but not 80 and therefore add 80 restriction lines - is this really what you want?

    From a code perspective repetition of the active code but within the elements of the added fields, assuming you have added those into the setup form for restriction as well.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Restriction on Item for zipcode,city,county,Zipcodegroup

    Hey Steven,

    The business logic is Ax considers  only country & state for sell restriction through standard PDSMRCRestrictionList in Inventory management. you can check out.

    The requirement is to add more precise delivery address details to this check like zipcode,city,county..

    I had done it..

    one need to modify the

    saleslineType_sales class

    Method-pdsmrccheckrestricted which is called whenever you add any item in sales line

  • Weaveriski Profile Picture
    Weaveriski 23,616 on at
    RE: Restriction on Item for zipcode,city,county,Zipcodegroup

    That is a HUGE setup on the combinations of postcode - so what you are saying is you can deliver to my neighbour but not me. What is the business justification for the coding?

  • UmesH@ Profile Picture
    UmesH@ 810 on at
    RE: Restriction on Item for zipcode,city,county,Zipcodegroup

    May You Can Use Extensible Data Security (XDS) Policy to Restrict item.

    For More Info

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans