0

I am using the REST API via pnpjs and nodejs to access Sharepoint online. I'd like to get field descriptions and titles in a language which is different from the user's current settings. How could I get this?

I can retrieve the field description just fine and from my reading of various documentation the DescriptionResource property should give me a SP.UserResource object which would then have a method GetValueForUICulture (SPUserResource). But I can't get there via the REST API. I tried something like this

const fields = await this.spClient.web.lists.getByTitle('MyList')
        .fields
        .select('InternalName', 'Title', 'TitleResource', 'Description', 'DescriptionResource')
        .expand('DescriptionResource','DescriptionResource/Name','DescriptionResource/Value')
        .expand('TitleResource','TitleResource/Name','TitleResource/Value')
        .get();

but the TitleResource or DescriptionResource is empty.

Is there a way to get there?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.