Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Open page in Create mode ( completely blank record editable page)

(1) ShareShare
ReportReport
Posted on by 36
Hi All,
I am newbie in business Central development . I searched this on internet but didn't get any correct  answers.
 
I have a requirement where a page need to be open in Create mode but the main thing I have to do it without RunPageMode property because I need to execute some code before Page opens .
 
I tried Page.Run(Page:: Page_name , Rec) without any filter for Record . It opens page with first record in table.
 
Please someone help.
 
Thanks in Advance...
 
 
  • Ankit Sik Profile Picture
    Ankit Sik 36 on at
    Open page in Create mode ( completely blank record editable page)
    Thanks @YUN ZHU,
     
    Now, This is confirm that we have to initialize the at least one field in table.
     
    It can't be done like when we click on New Button on List Pages. 
     
    Thanks.
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 77,245 Super User 2025 Season 1 on at
    Open page in Create mode ( completely blank record editable page)
    Hi, you can try the following trick to create an empty record and then open this page. (Of course you can set other initial values)
    In this way, if the automatic allocation No. Series is set, the number will be automatically set on the page.
     
    Hope this helps.
    Thanks.
    ZHU
  • Ankit Sik Profile Picture
    Ankit Sik 36 on at
    Open page in Create mode ( completely blank record editable page)
    Hi @Yun Zhu,
     
    As you suggested in previous answers, RunPageMode and RunObject properties  is working fine , but I need to open the page in create mode in ONACTION TRIGGER . 
     
    Please help in this condition . When I try Page.Open(Page::page_object, rec) it opens the first record on the page . 
     
    Please Help . Is there any method to do it or not?
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 77,245 Super User 2025 Season 1 on at
    Open page in Create mode ( completely blank record editable page)
    Hi, if you are a developer, you can write a simple code to clear it.
    For example,
    Or you can use the Configuration Package to delete it.
     
    Hope this helps.
    Thanks.
    ZHU
  • Ankit Sik Profile Picture
    Ankit Sik 36 on at
    Open page in Create mode ( completely blank record editable page)
    Hi @YUN ZHU and gdrentaria,
     
    Thanks for your reply ,  I really helped to solved my problem .
     
    But I am stucked in one more thing which is (There is a sales order in our database which is created by code in mistake having Blank primary key). Now I want to delete that sales order . But it says sales lines should have document no. (not blank) even I can't delete sales line also and tried to assign another non blank key but it says Sales order can't be renamed .
     
    What I do here to delete that one ? Do you have any idea.?
    Please Help.
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 77,245 Super User 2025 Season 1 on at
    Open page in Create mode ( completely blank record editable page)
    Hi, do you mean to open the page in new mode?
    This doesn't require code, it can be done by simply setting the property.
    For exmaple,
    More details:
     
    Hope this helps.
    Thanks.
    ZHU
  • gdrenteria Profile Picture
    gdrenteria 13,918 Most Valuable Professional on at
    Open page in Create mode ( completely blank record editable page)
    Hi
    I hope I understood correctly, the way to open a card type page from Bc would be through a list type page.
    So using this property "CardPageID" you link that list-type page with its corresponding card, which is "opened" to execute insertion, modification or deletion actions. I hope it can help you a little.
    Best regards
    Gerardo

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans