how to create the replacing view module?

This is going to be beginner question. I have created new section from section wizard which has a title as 'Test Section' and Code is 'UsrTestSection'. Now I want to create the replacing view module for that. When I go and add replacing view module under the parent object my newly created section's code doesn't appear in the list. Why is that? Can I know the ideal way to create replacing view module to override section page's method? (I am in classic UI) 

 

Like 0

Like

2 comments

This typically happens for 2 possible reasons:

  1. The thing you're attempting to replace exists in the same package - you cannot have a replacing view model and the thing it's replacing in the same package
  2. Or the package where you're attempting to create the replacing view model (assuming the original view model is in a different package) does not have a dependency to the package containing the original view model - the package where you're creating the replacing view model must have a dependency to the package containing the original schema

If you've created the original section, why are you needing to create the replacing view model, rather than just making the changes to the section you created? Maybe describe what you're attempting to accomplish?

Ryan

Ryan Farley,

Thank you for the response. I want to create the section that directly opens the dashboard part of the page and doesn't show toggle button to switch to section record list page( As I want to use this  section as Dashboard page). Creatio support instructed me to create the replacing view module and insert below code to hide the gride view 

/** * @override */ 

 

getDefaultDataViews: function() { 

var result = this.callParent(arguments); 

delete result.GridDataView; // Removes the default grid view return result; 

}

 

I see newly created test section 'UsrTestSection' exist in custom folder. I have tried directly inserting above code into methods of client module but  it doesn't help me hide the grid view part

Show all comments