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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Validate post code of contacts

(0) ShareShare
ReportReport
Posted on by 443

Hi All

I have contacts inserted in table ID 5050 - Contact. And I have updated table 225 - Post Code and now I want to validate field: Post Code on Table Contact.

I tried to use Rapid package to first export all records with all fields and I get error File is to large, thus export to Excel fails.

I am trying to write a processing report that will read all the values inserted on field: Post Code from table Contact and validate field: Post Code.

ContactRec.GET("No.");
PostCodeRec.SETFILTER(PostCodeRec.Code,ContactRec."Post Code");
 IF PostCodeRec.FINDFIRST THEN BEGIN
  CurrFieldNo := ContactRec."No.";
  "Post Code" := ContactRec."Post Code";
  City :=PostCodeRec.City; //V1
  County :=PostCodeRec.County; //V1
  CountryCode :=PostCodeRec."Country/Region Code"; //V1
  PostCodeRec.ValidatePostCode(City,"Post Code",County,"Country/Region Code",(CurrFieldNo <> '0') AND GUIALLOWED);
END;

It does find correct records and it fills them as expected, but after validating is done, it does not commit values on the appropriate fields of Contact table.

How would you validate a value of a field for all records in a table where field that has to be validated already has inserted values as expected.

Thank you, Damjan

I have the same question (0)
  • Suggested answer
    Andy Sather Profile Picture
    on at

    Hello  Damjan- We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,151

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,443 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans