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...
Unanswered

Create recurring Sales Invoice question

(0) ShareShare
ReportReport
Posted on by 119
Hello everyone. 
I created Table called Import Traffic. And there I have following fileds: 'Customer No.', 'Posting Date', 'Document Date', 'Fiscalization Type', 'Document Type', 'Responsibility Center', 'Salesperson Code'. and some filed for like on sales line 'Quanity', Amount, etc.
I created an action and when I run action I want to create Sales Invoices, on this logic:
If we have three records:  Three different Customers, in any way, we will create three invoices. If we have on two records one Customer, and on one record another customer, but If on all three records we have all different Responsibility Centers, we will create also three Invoices. 
If we have three records: Same customer on three records, and two Responsibitlity centers, and Three different Posting Dates, we will create three Invoices, but If we have, all 7 fields ('Customer No.', 'Posting Date', 'Document Date', 'Fiscalization Type', 'Document Type', 'Responsibility Center', 'Salesperson Code) same for all tree records we will create just one Invoice, but three Sales Line Records for that Invoice.
Like to count how many different combination we have of that 7 fields, and to create that many invoices.
After create I store Sales Invoice No into Import Traffic, for every row, if that row went to Invoice.
Maybe looks little confused, but I don't have a way to explain different.
Do you know how to do that.?
Thank you :)
  • ManishS Profile Picture
    80 on at
    Create recurring Sales Invoice question
    What is the Key for your customised table, are all 7 fields the key, if yes then you need to find the record already exists, if does add up the amount and if not then create a new line.
     
    You can find the record using Get function for unique record as per your keys.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,041 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,860 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans