How to same page for New and Edit an entity with different Label Name and Button ?

0
Hello, I have an entity course for example.  Screenshot attached Attribute: Course Entity CourseId : AutoNumber CourseName : String CourseDescription : String   In New Page:  Header label of the page should be “Add Course”. In the page as CourseId is autonumber, I don’t want to display the same in my Add page. Only CourseName and CourseDescription should be displayed and button name should be Save and Cancel. CourseId will be displayed as Successful Save operation ex : Course added successfully with Id : <CourseId> In Edit Page: Header label of the page should be “Modify Course”. In the page as CourseId will be displayed in read only mode. Only CourseName and CourseDescription should be displayed and button name should be Modify and Cancel. CourseId will be displayed as Successful Save operation ex : Course modified successfully with Id. I had an idea to pass an parameter on the click on each button, but don’t know how I can do that. Example: On Click of Add, I can pass an parameter like “AddCourse” string is passed to page and I can change the label and button names based on these fields. How to pass an parameter to page while opening ? Please guide.  Is there any better approach to achieve the same, please advise. Question 2 : Default button in Grid don’t have option to call microflow and add a parameter to pass it. How can we do it to call a microflow while click on New and Edit. ?   
asked
1 answers
0

“ How to pass an parameter to page while opening ? Please guide.  “

Easiest way to get started with this is have Mendix do this for you, either of these two ways:

  • Right click you button ‘Edit (default) and select ‘Generate onclick page’; Or, if that fails:
  • In your domain rightclick entity Course and select ‘Generate overview pages’. It will generate the Course_Overview and Course_NewEdit for you.

Now check out Course_Overview, see what the Edit-button does and notice that page Course_NewEdit contains a datagrid with, as datasource, an object of entity-type Course.

Also use this option to override the page title, so you can make the title different per clicked button:

 

answered