Skip to main content

Notifications

Announcements

Business Central forum
Answered

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

editSubscribe (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...
 
 
Categories:
  • 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 60,659 Super User 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 60,659 Super User 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 60,659 Super User 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 3,056 Super User 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

Helpful resources

Quick Links

Take the Community feedback survey!

Answer this brief 15-question survey about your Community experience…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,324 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,096 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans