1
Vote

How to get value of WPROJ_STS_SUBWEB_NAME field

description

Hi!

I'm trying to get in the code the value of field WPROJ_STS_SUBWEB_NAME (this is standard field of table [MSP_PROJECTS]):

For that I described a class project:
public class Project
    {
        [PSEntityUidField(ColumnName = ProjectCustomFieldsColumnNames.PROJ_UID)]
        public Guid Uid { get; set; }

        [PSNativeField(ColumnName = ProjectCustomFieldsColumnNames.PROJ_NAME)]
        public string Name { get; set; }

        [PSNativeField(ColumnName = "WPROJ_STS_SUBWEB_NAME")]
        public string SubWebName { get; set; } 
    }
and use it:
Project proj = projectsService.Get(_projectGuid, true);
string _projectName = proj.Name;
string _projectSubWebName = proj.SubWebName; // always is null
But value always is null...

How to solve this problem?

comments

NetGuru wrote Apr 19, 2013 at 11:05 AM

Anybody help me, please...

wrote Apr 19, 2013 at 11:07 AM

StevenTCramer wrote May 23, 2014 at 3:22 PM

Looks like that should work to me.

SELECT WPROJ_STS_SUBWEB_NAME
FROM MSP_PROJECTS

From the database and make sure the value is not actually NULL. If it isn't then have to step through the code and debug it.

NetGuru wrote May 27, 2014 at 8:34 AM

Your solution involves direct access to the database, but this initially the wrong way.
I need access via a web service.