get data and push it to page

Hi All,

i have a case like this
i have one sales order on sales line, the sales order need to get data of another table ( item , for example ) , and the record was meant to have 4 record with different info. i need to pull that info, save it to a variable on page, and push it to a page. but seems that it only show last record information. if i do that on report, that will be easy, but can i be done on a page. i put my code on ( onaftergetrecord) , when i put ( onint ) it did not work.

can i do that on page directly like that?

thanks,

Answers

  • postsauravpostsaurav Member Posts: 708
    Hi,
    It seems that you have a sales order and which have one sales line. Now with that sales line there can be 0..n no of records in another tables lets say sales line details.

    If that is the case then you cannot get that on the same page but if you create a seprate page for the sales line details table and add that to the page as a child of sales line you can show all records referring to the particular sales line.

    OR

    In Sales Order page insted of sales line subpage, add the subpage of sales line detail and on that based on code get the sales line field in variable.

    So what i am trying to explain is -
    In a standard sales order page you get multiple lines because they are related with no and doc type.
    You cannot have a page of sales header table which shows you related info for all sales line because they are multiple.

    If i am confusing you, do let me know.. I will be happy to help.

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • hi @postsaurav :smile:

    i am building a separate page actually. that page was to get data from sales line, and get another information from another table. that page was meant to be a list only. so we are not modify std nav object.

    but i am having since the sales line have only one record / one line, the variable was show only last record of information that i needed. i try to debug the code and it showing repeating different information that i've expected. but on the page itself show only last record , instead of all records

    thanks,
  • postsauravpostsaurav Member Posts: 708
    Hi @yonhantdaenta89@hotmail.com ,
    Yes that is what i was trying to explain. It will only be able to show you last record.

    Try this -
    > You have tables says - sales header, sales line & Sales line extension.
    > Now you can have multiple sales lines for a sales header.
    > and multiple sales line extension for a sales line.

    So the correct solution is to build a page on Sales Line Extension and then using variables get the fields from sales line.. Does that make sense.. if not let me know.

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
Sign In or Register to comment.