Is it possible to get ResourceCustomFields table value??

M

manoj

Hi,

Is it possible to fetch ResourceCustomFields table values using
ReadResources(xmlfilter,autoCheckout) method.
I know we can do the same using ReadResource(GUID).

If its is possible using ReadResources method, how we should we define
filter for that...??
i am using the below code, but it is throwing GeneralUnhandledException.

Here webservice is my web service
name(https://(server))/_vti_bin/psi/Resource.asmx)....

webservice.Resource res = new CustomFields.webservice.Resource();
webservice.ResourceDataSet resDataset = new webservice.ResourceDataSet();
res.Url = "https://(servername)/_vti_bin/psi/Resource.asmx";
res.Credentials = System.Net.CredentialCache.DefaultCredentials;
PSLib.Filter filter = new Microsoft.Office.Project.Server.Library.Filter();
filter.FilterTableName = resDataset.ResourceCustomFields.TableName;

filter.Fields.Add(new
PSLib.Filter.Field(resDataset.ResourceCustomFields.TableName,
resDataset.ResourceCustomFields.RES_UIDColumn.ColumnName));

filter.Fields.Add(new
PSLib.Filter.Field(resDataset.ResourceCustomFields.TableName,
resDataset.ResourceCustomFields.CODE_VALUEColumn.ColumnName));

resDataset = res.ReadResources(filter.GetXml(), false);
This last line throws exception...


any sort of help will be appreciated...

thanks..
 
B

Brian Smith \(MSFT\)

Hi manoj,

Unfortunately that secondary datatable of the resource dataset cannot be
selected using the filter. You can use a filter of an empty string
(string.empty) and all records in all datasets can be returned, which you
could then filter on the client side. Another alternative would be to
create a PSI extension that handles this extra filtering on the server.

Best regards,

Brian.
 
M

manoj

Hi brian

Thanks a lot...
i am passing an empty filter now(as there is no option to set filter for
ResourceCustomFieldDatatable)...this way i need to do some extra calculation
but m able to fetch required fields...

Regards,
manoj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top