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

Community site session details

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

Ask help with fields

(0) ShareShare
ReportReport
Posted on by 7

Hi guys, I started programming navision a week ago, but I ran into a problem that I can't solve. On the sales line, I want to put a field for the article in which the article table has the necessary content.
I have used the FlowFields Lookup function, but with that the field does not appear in the configuration packages. What could be an alternative? Alternatively, is this function the only one that can transfer field data from another table and load it in one by one?

Thanks in advance.

I hope I didn't ask stupid questions.

I have the same question (0)
  • Suggested answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at
    RE: Ask help with fields

    Hi Szaki33

    Your question is a very good question, can you please clarify your question more like what you mean by "Alternatively, is this function the only one that can transfer field data from another table and load it in one by one?" Are you asking if there are other methods to transfer field data from another table and load it into the sales line? or do you mean you want to transfer field data from another table through lookup and load it into sales line?

    Regards

  • Szaki33 Profile Picture
    7 on at
    RE: Ask help with fields

    Hello Govinda Kuma,

    i want to load data in Page "(Sales Quote Subform (95, ListPart))" into "Sales Line (37)" table field, from Item (27) table, by No.

    How can i do that?

    Thanks.

  • Suggested answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at
    RE: Ask help with fields

    Hi,

    If I understand you correctly, you can do this by simply adding a table relation to your sales line field, like this

    tableextension 50100 MyExtension extends "Sales Line"
    {
        fields
        {
            field(70000; YourField; Code)
            {
                TableRelation = Item."No.";
            }
        }
    }
     

    This should establish the relation, lookup, and allow data transfer.
    Regards

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Ask help with fields

    Hi,

    Flowfields never visibles on Config. package. In that case you need to change your logic. Create a new field on Sales Line Table, and OnAfterValidate event of sales line with No. field pass the values from the Articale table to your new table. and then you can use your config. package.

        [EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterValidateEvent', 'No.', true, true)]
        local procedure OnAfterValidateEvent_itemNo(var Rec: Record "Sales Line")
        var
            Item: Record Item;
        begin
            if rec.Type = rec.Type::Item then
                if Item.get(rec."No.") then
                    rec.Newfield := Item.Desirecfieldvalue;
        end;

  • Szaki33 Profile Picture
    7 on at
    RE: Ask help with fields

    Hello thanks a lot, its work fine for me, i wasnt to far from that. :)

    But now i have the next problem, how can i put "where". If I have 2 condition?

    I hope u know what i want.

    CalcFormula = lookup("Item Unit of Measure"."Qty. per Unit of Measure" WHERE("Item No." = FIELD("No."), Code = Field("Tour unit help")));

    It was my calc formula code.

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Ask help with fields

    There is already a where condition in your formula

  • Szaki33 Profile Picture
    7 on at
    RE: Ask help with fields

    Yeah but the calc is not good for me, i want to change it like this:

    [EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterValidateEvent', 'No.', true, true)]

       local procedure OnAfterValidateEvent_itemNo(var Rec: Record "Sales Line")

       var

           Item: Record Item;

       begin

           if rec.Type = rec.Type::Item then

               if Item.get(rec."No.") then

                   rec.Newfield := Item.Desirecfieldvalue;

       end;

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Ask help with fields

    So what is the Sales Line field and item table field in that?

  • Szaki33 Profile Picture
    7 on at
    RE: Ask help with fields

    i want this: WHERE("Item No." = FIELD("No."), Code = Field("Myfield what fill with data before with your code")));

    How can i do this with trigger?

    I hope, u know what i want.

    If not, write me what i should give.

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Ask help with fields

    Where you want this change?

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,553

#2
Sumit Singh Profile Picture

Sumit Singh 2,057

#3
YUN ZHU Profile Picture

YUN ZHU 1,915 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans