Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

New Page with Temp Table as source plus CardPageID

Posted on by 5,124

Hello.  I wanted to mimic the Item List page but change the source as I need to show purchase line records instead whereby item no is part of the fields and also show some of the fields from the ITem table.  So essentially, the source is an inner join between Purchase Lines Table and Item Table.  But I still want to show the Item List Factboxes and I still want users to go to Item Card (or Purchase ORder Card) when dbl clicking onto the record.  THe problem is I chose the solution of using a temporary table that is populated on open of the page.  This way I don't have to worry about the integer table to show fields from Item table.  Everything looks good except that when I double click I get an error because I have CardPageID set to Item Card from the properties of the Temporary table which is the source of the page.  I got rid of this problem by removing the CardPageID value and just creating a function that opens Item Card on assistedit of ITemNo.  However, I am still having problems with the factboxes I copied from Item List.  I already changed the link so it only looks for the corresponding Itemno (no date filters).  I get below error:

Please help! I have below properties for that factbox:

I look forward to hearing back from you!

*This post is locked for comments

  • Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: New Page with Temp Table as source plus CardPageID

    Glad it worked out for you.

  • mbr Profile Picture
    mbr 5,124 on at
    RE: New Page with Temp Table as source plus CardPageID

    HI Suresh! Thank you so much! It really helps talking my problem through with experts such as yourself. :)  I figured out my problem.  You were right.  I needed to recompile my factbox.  For some reason, I lost the query I created for that factbox.  Hence, the error I got when I added the factbox.  YOu actually mentioned that in your first reply and it resonated to me last night. :)  As soon as I recompiled that factbox successfully, it worked like a charm.  I ended up using my temporary table after all.....because I am paranoid...haha!  But I will use these existing tables as temporary one of these days as we have limitation on how many tables we can create anyway.  Anywy.  Thankyou so much!

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: New Page with Temp Table as source plus CardPageID

    Since we will set source table as temporary it should not hurt. Anyhow always test your changes in test database before you deploy into production.

  • mbr Profile Picture
    mbr 5,124 on at
    RE: New Page with Temp Table as source plus CardPageID

    Hmmn.  Perhaps, your idea is better.  I will just make Item a temporary table and overwrite some fields with the values from purchase lines table.  I can't hurt the real Item Table, right? since it's marked as SourceTableTemporary=Yes.  And yes, I created the Item Order Line Factbox.  I will try your idea.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: New Page with Temp Table as source plus CardPageID

    Yes, the page can have only one source but my idea was to use Item as temporary table and then on open page get the values from item and purchase and insert into table by using other fields on the item, since it is anyway temporary. Anyhow i did create a temporary list page with source as temporary and populate the values on openpage , i copied the Item Planning Factbox from item list page and just changed the subpage link.

    Everything was working for me as expecting, i did not change any property.

    The Item Order Line Factbox in the above screenshot is not a standard factbox, is that custom factbox ?

  • mbr Profile Picture
    mbr 5,124 on at
    RE: New Page with Temp Table as source plus CardPageID

    Hi Suresh.  The reason I didn't user Item as the source and just set it to temporary is because I also need values from Purchase lines.  You can only have 1 source table in the page, right? or you can also use integer table.  SO I thought for this new page, I can try temporary table whereby I populate this on open of the page from a query which is already set for two table joins.  problem is the factboxes won't work anymore even after I changed the links.  I get the Factbox error when I open the new page and it just closes the factbox.  If this still doesn't work, I may just use item as the source table and just create integer table for the purchase lines fields.....unless you have a better suggestion.  Basically for the source of this table, I want it to be from two tables: Item and Purchase line.  But I still want to copy the factboxes from the Item List Page.

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: New Page with Temp Table as source plus CardPageID

    You did not mention when are you getting the above error message and is the temporary table you used is a new table you created? Why didn't you use the Item as the source of table but set Temporary as true?

    Anyhow it does look like a compile issue, try to compile factboxes, list page and your query.

  • mbr Profile Picture
    mbr 5,124 on at
    RE: New Page with Temp Table as source plus CardPageID

    Here are the error message/factbox properties that you may not have seen from my original message. :)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans