Dynamic Type Cannot Be Resolved

Posted by Community Admin on 04-Aug-2018 02:36

Dynamic Type Cannot Be Resolved

All Replies

Posted by Community Admin on 13-Apr-2016 00:00

Howdy,

I have two pages, Projects and Resources.

I want to be able to set all Resources related to a Project, from the Project backend page. Resources have a RelatedProject column and i want to update this from the Project backend. I've created a NumRelatedAssets field in sitefinity that relates to a dynamic items field control selector and my intention is to loop through the selections and POST the currently selected ProjectID to each Resource during the get_value portion of the control and set the NumRelated Assets to however many are set.

However, when I create the Number type and go to the backend Project page. I get the "Type: Telerik.Sitefinity.DynamicTypes.Model.Resource.Project cannot be resolved" error. Which is strange, because the dynamic type is supposed to be set to Resource.Resource not Resource.Project. Is there somewhere that I can prevent the .Project from replace .Resource? Thanks, also if there's an easier way I'd appreciate the heads up.

Posted by Community Admin on 15-Apr-2016 00:00

Hi, 

Could you please elaborate on what you have done so far and maybe upload some screenshots or the code files themselves? 

Additionally please delete the error logs under the ~/App_Data/Sitefinity/Logs folder (or save them to another location for a backup) and then try to reproduce the issue again. Afterwards you can upload the generated files under the Logs folder so that I can inspect them.

The issue related to the error "Type: Telerik.Sitefinity.DynamicTypes.Model.Resource.Project cannot be resolved" may also occur if the project name in the ProjectConfig.config file has been changed.

Regards,
Dimitri Cools
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 20-Apr-2016 00:00

Sure, thanks for checking up Dmitri. I really appreciate it.

So, I have Resources/Assets. I'm going to call them Assets from now on to avoid confusion with any potential Sitefinity terms. These Assets can relate to one or no Project. A Project is just a way to group similar Assets.

So, to group all Assets under a Project, I added a column to the Assets table called RelatedProject. This is a single GUID and holds a Project's OriginalContentId. I'm not really sure why at the moment, I did it that way and not just an array of GUID's on the Project side. I'm pretty sure there was a good reason. 

So anyway, now I have to be able to select multiple Assets from the Project's backend. I created a Dynamic items field control selector that lets me multi-select Assets. I then created a NumRelatedAssets column in Project that stores a NUMBER. And when you multi-select Assets, i want to save the amount of them that you selected as well as individually go through each Asset selected and Update their RelatedProject column. However, after creating the NumRelatedAssets field in the Project as the screenshot shows and setting its path, I'm greeted with the other attached image. The type error. I can no longer access the backend page for each Project. And the Type SHOULD be Model.Resource.Resource but for some reason it was changed to Model.Resource.Project

 

Additionally, there exists no Log folder in AppData/Sitefinity/ or anywhere in this project tbh... odd

Posted by Community Admin on 21-Apr-2016 00:00

Hi Bryan,

Thanks for your reply, I now have a better view on what you are trying to achieve.

Regarding the error you are having, it is very difficult to investigate this as we would require more detailed information which is not possible in this forum thread.

I therefor suggest, should you want to persue this, to open a support ticket so that that we can have a look at it in more details.

Now, based on your explanation I have the impression that you are using an older version of Sitefinity.
From Sitefinity version 7.0 and on, you can include related content to dynamic modules, built-in modules, and pages.

All this is implemented out of the box and you can relate content to any other content, thus creating complex architectures of structured data that is easily manageable. You can create one-to-one or one-to-many relations between different items. Sitefinity makes it easy to display all related items on the frontend. 
Therefor it would be better to think about upgrading to a newer version.
Here is a direct link to the complete documentation on this:

Content relations: Related data
http://docs.sitefinity.com/content-relations-related-data
 
Regards,
Dimitri Cools
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed