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 :
Business Central forum

Business Central SaaS: Multiple changing attribute entries for a serial number item

(0) ShareShare
ReportReport
Posted on by 35

Hi,

wie are basically distributing products (buying/selling). For some products we make some measurements that are individually for each serial number. We do this for guarantee reason to our vendor and to our customers. Fictitious example: selling an smartphone battery, we would measure capacity and voltage

0. measured original values from our vendor

1. when receiving it from our vendor

2. when selling it to the customer

3. getting it back from our customer as a guarantee case

4. ...

So far, it is a very simple excel sheet, looking like:

Serial number meas. date user name value 1 value 2 .... value 44
3947783 2019-05-20 sam 33 2.4 ... 777
3947783 2019-05-21 rick 33 2.5 ... 776
... ... ... .. ... ... ...
2877227 2018-01-01 john 31 2.3 ... 801

I would like to store those values - currently existing as excel-sheet - into the BC-Database. Is this possible? If not does someone know an extension that is able to do this?

Shouldn't be to difficult as it is only an ongoing list of values.

Thanks in advance

Andreas

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    You need to have a table that for every serial number can track the N records for the measurements. You can achieve this with a simple extension that creates:

    - a table object

    - a page object

    Then you can load your existing data from Excel to your new table by using Configuration Packages.

  • Andreas78 Profile Picture
    35 on at

    Hi Stefano,

    thanks a lot. Do you have a quick reference, example...  (or the page number in your book "D365BC Dev. Quick Start Guide" which of course i bought recently ;-) ) to setup such an simple table and page object - quick and dirty for the beginning. Currently i do not have the time to start reading your whole book. What i need is a quick step by step intro to such an extension. Do you have some hints how to start with such an easy extension without cominciare ab ovo. What would be very helpful would be 5-10 rough major steps.

    Thanks a lot!

    Andreas

  • Andreas78 Profile Picture
    35 on at

    And just to make it sure: it is possible for the cloud (not on-premise) version?

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    Yes sure, same thing for cloud and onpremise version. I’ll share an example for your case here in the next hour. On my quick start book, check the demo app creation where we create a table and a page.

  • Andreas78A Profile Picture
    10 on at

    Thank you again - looking forward to example. Additionally i will check the demo app.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    This is just an idea:

    table 50100 "Serial No Measures"

    {

       DataClassification = CustomerContent;

       fields

       {

           field(1;"Serial No."; Code [20])

           {

               DataClassification = CustomerContent;        

           }

           field(2;"Line No."; Integer)

           {

               DataClassification = CustomerContent;        

           }

           field(3;"Measure Date"; Date)

           {

               DataClassification = CustomerContent;        

           }

           field(4;Username; Code[20])

           {

               DataClassification = CustomerContent;                    

           }

           field(5;Value; Decimal)

           {

               DataClassification = CustomerContent;        

           }

       }

       keys

       {

           key(PK; "Serial No.","Line No.")

           {

               Clustered = true;

           }

       }

       trigger OnInsert()

       var

           SerialNoMeasures: Record "Serial No Measures";

       begin

           SerialNoMeasures.SetRange("Serial No.","Serial No.");

           if SerialNoMeasures.FindLast() then

               "Line No." := SerialNoMeasures."Line No." + 1

           else

               "Line No." := 1;

           Username := UserId;

       end;

    }

    page 50100 "Serial No Measures List"

    {

       PageType = List;

       ApplicationArea = All;

       UsageCategory = Lists;

       SourceTable = "Serial No Measures";

       layout

       {

           area(Content)

           {

               repeater(GroupName)

               {

                   field("Serial No."; "Serial No.")

                   {

                       ApplicationArea = All;                    

                   }

                   field("Measure Date"; "Measure Date")

                   {

                       ApplicationArea = All;                    

                   }

                   field(Value; Value)

                   {

                       ApplicationArea = All;                    

                   }

               }

           }        

       }

    }

  • Andreas78 Profile Picture
    35 on at

    Thank you again. I very much appreciate that you took the time to give me these example!

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans