Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Read project details (javascript)

$
0
0

Hi,

I cannot figure out how to read the details of a project, ex. I can get the Name, ID, CreatedDate etc. but not the Owner, StartDate, EnterpriseProjectType etc..

I tried with the following code, what am I doing wrong?

                    projectContext.load(proj);
                    projectContext.load(proj.get_owner());
                    projectContext.executeQueryAsync(function () {
                        var name = proj.get_name();
                        var ept = proj.get_enterpriseProjectType();
                        var owner = proj.get_owner();
                    }, function (sender, args) {
                        alert('Error: ' + args.get_message());
                    });

The Owner and EPT variables are assigned an object, but I cannot figure out which type of object. would expect it to be a string.

I also tried with:

projectContext.load(proj, 'Include(Name, Id, Owner)');

Please, any help is appreciated.




Viewing all articles
Browse latest Browse all 5347

Trending Articles