Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Copper Super Contributor
Posts: 21
Registered: ‎12-08-2009

Value cannot be null when adding a new relationship

[ Edited ]
I created a new id field in the Account table using database manager. I'm trying to add a New Relationship under Child Properties under Account to the new id field. This id field is meant to be of type "user" so I try to relate my new id to the type USER (userid). I've done this many times in the past succesfully. Today, it seems like I cannot create any relationships under Child Properties under Account. I get this error:

===================================
An application exception has occurred.
===================================

Value cannot be null.
Parameter name: value (Sage.Platform.Projects)

------------------------------
Program Location:

at Sage.Platform.Projects.Localization.ProjectResourceSet.OnAddResource(String name, Object value)
at Sage.Platform.Projects.Localization.ProjectResourceSet.AddUpdateResource(String name, String value)
at Sage.Platform.Projects.Localization.ProjectResourceManager.AddUpdateResource(String name, String value)
at Sage.Platform.Orm.Entities.OrmEntityProperty.set_DisplayName(String value)
at Sage.Platform.Orm.Entities.OrmRelationship..ctor(OrmEntity parentEntity, OrmEntity childEntity, String cardinality, OrmEntityProperty parentProperty, OrmEntityProperty childProperty, CascadeOption cascadeOption)
at Sage.Platform.Orm.Entities.OrmEntity.CreateChildRelationship(OrmEntity child, String cardinality, OrmEntityProperty parentProperty, OrmEntityProperty childProperty, CascadeOption cascadeOption)
at Sage.Platform.AdminModule.EntityModel.EntityModelCommands.NewRelationshipCommand(Object sender, EventArgs args)

Any help would be appreciated. Thanks -Steve
Message Edited by kennedystephen on 05-13-2010 11:01 AM
Highlighted
Copper Super Contributor
Posts: 21
Registered: ‎12-08-2009

Re: Value cannot be null when adding a new relationship

Seems like there was something wrong with the USER Entity. When I opened it and went to the SDATA tab, I got some bizzaro error. I also noticed that the Plural Display Name field on the USER Entity was blank. I filled in "Users". I also noticed that the Track History To: field was blank. I selected "None" from the dropdown. After that, when I went back to the SDATA tab, I didn't get the bizzaro error. I immediately tried to create the relationship again, and it worked. So seems like something was wrong with the the USER Entity.

 

 

Earlier, I had tried to make some other changes (full rebuild, clean project recycle bin, etc). None of those seemed to immediately fix the error. But maybe, between those changes and the ones I just made to the USER Entity in combination fixed it. Can't be sure.

Highlighted
Employee
Posts: 535
Registered: ‎03-30-2009

Re: Value cannot be null when adding a new relationship

Steve - big thanks for posting this

 

I ran into a similar problem recently and almost resorted to creating the relationship XML file manually... with lots of confusing GUIDs to generate, etc.

 

In my case - the Display name property for User was blank, and the Track History to was blank as well. I populated them both appropriately and then (without doing any build steps) immediately created my relationship and it worked (yes!).

 

 

Todd Hardin
SalesLogix Professional Services Group