Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

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

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 64,622 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 64,622 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 64,622 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 5,353 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

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,768 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,985 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans