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 :
Microsoft Dynamics NAV (Archived)

Create a Record for Each Customer

(0) ShareShare
ReportReport
Posted on by

I Have a Table Called "Manufacturer " With two Fields,  "Code" and "Name". 

Within the Job Queue Management I want to essentially create a record for each Customer. The Code would be the Customer "No." and the name would be the Name of the Customer's "Name". 

Customer No. = Code

Customers name = Name

How would this be written? Thanks 

Variables*

recCustomer

recManufactuer

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    probably a codeunit  (run frequency / condition as you like)

    RCustomer -> Record -> Customer
    RManufacturer-> Record -> Manufacturer

    RCustomer -> Record -> Customer
    RManufacturer-> Record -> Manufacturer
    
    RCustomer.RESET;
    IF RCustomer.FINDSET THEN REPEAT
     RManufacturer.RESET;
     RManufacturer.SETFILTER("Customer No.",RCustomer."No.");
     IF NOT RManufacturer.FINDFIRST THEN BEGIN
      RManufacturer."Customer No.":=RCustomer."No.";
      RManufacturer."Customers name":=RCustomer."Name";
      RManufacturer.INSERT;
     END;
    UNTIL RCustomer.NEXT = 0;



  • Verified answer
    Binesh Profile Picture
    7,885 on at

    Hello,

    Follow the polo solution, you can also use my solution, this has little bit fast.

    RCustomer -> Record -> Customer

    RManufacturer-> Record -> Manufacturer

    RCustomer.RESET;

    RCustomer.SETCURRENTKEY("No.");

    IF RCustomer.FINDFIRST THEN

    REPEAT

    IF NOT RManufacturer.GET("RCustomer."No.") THEN

    BEGIN

     RManufacturer."Customer No.":=RCustomer."No.";

     RManufacturer."Customers name":=RCustomer."Name";

     RManufacturer.INSERT;

    END;

    UNTIL RCustomer.NEXT = 0;

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 > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans