Creating custom module - Object type does not show

Kayla Johnson asked on November 27, 2017 18:53

I'm creating a new Employee module to manage some Employee information for an intranet. I created the Module and Class: https://pasteboard.co/GVChEMU.png

Now I'm trying to create the Admin UI for the Module. It does not show the Object I created though from above: https://pasteboard.co/GVCid0k.png

If I leave it as inherit, and try to create a new Employee from the UI, it says this: "The object type property is not set."

What is wrong?

Correct Answer

Suneel Jhangiani answered on November 28, 2017 17:13

Unfortunately there is no way for you to develop a module without being able to re-build the solution. If Kentico had been installed as a Web Site instead of a Web App then the code could be rebuilt dynamically. However, as a web app you do need to pre-compile the code and whilst most would suggest using Visual Studio it is also possible to build using command line tools.

As an alternative you might be able to use Custom Tables, but it does depend on the functionality you require.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Zachary Perry answered on November 27, 2017 19:13

I have alqays just clicked the arrow next to the drop down list and typed my classname. You would type Employee.Employee

Then for the new and edit underneth, i have left those to inherit.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on November 27, 2017 19:15

Doing that gets me this: "The object does not exist. It may have been deleted by someone else."

0 votesVote for this answer Mark as a Correct answer

Zachary Perry answered on November 27, 2017 19:20

Did you generate and save the code for your classes?

Are you using a web app or website? If a web app make sure you do a build.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on November 27, 2017 19:48

Yeah there was code here before, but I clicked Generate, and Save anyway... https://pasteboard.co/GVCFb4z.png

0 votesVote for this answer Mark as a Correct answer

Vukasin Andjelic answered on November 28, 2017 13:22

After generating the code build the solutions, and if you didn't set localization, then try to search in dropdown ObjectType for ObjectType.name of class. If U didn't create localization then u can't use the name of the class.

Finally, create a resource string for displaying the binding class's object type name:

  • In the Kentico administration interface, open the Localization application.
  • On the Resource strings tab, click New string.
  • Enter the following Key: ObjectType.CompanyOverview_OfficeUser (the general format is ObjectType.
0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on November 28, 2017 15:30

I don't understand how Localization would help. I did add it and it still does not show up in the dropdown for Object type in the User interface panel.

One thing from documentation is it says: "Note: On web application installations, the system generates the files in the Old_App_Code folder. You need to manually include the files into the CMSApp project and build the solution (or move the files into your own custom module project)."

And my Save path is: "~/Old_App_Code/CMSModules/Employee" but I don't have a CMSApp folder when I try to select a different folder.

I am not working in VS. I am just working in the browser. I can't build a solution.

0 votesVote for this answer Mark as a Correct answer

Vukasin Andjelic answered on November 28, 2017 15:47

Ok, but you as you see, if u choose web application, and you generate files, you need to open site solution in VS and to include this files and to build the project. Because of that u can't see it in User Interface

0 votesVote for this answer Mark as a Correct answer

Suneel Jhangiani answered on November 28, 2017 16:14

When you create the Class in the Modules application it basically creates the necessary table in the database. You then need to generate the code so that the rest of Kentico knows how to access this table in the database (ie. the info and provider objects). Unfortunately for Web Apps this requires you to rebuild the solution before being able to access them.

Therefore, as per the suggestions already received, you should load the Solution in Visual Studio and rebuild it.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on November 28, 2017 17:02

There has to be a way to do this without Visual Studio. I don't have the solution to work with. This site has been entirely developed on the browser.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.