Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added -OpenDocumentsIn option to Set-PnPList #2873

Merged
merged 10 commits into from
Mar 10, 2023

Conversation

KoenZomers
Copy link
Collaborator

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

N/A

What is in this Pull Request ?

Added -OpenDocumentsIn option to Set-PnPList which allows configuring if documents should be opened in the browser or in the local client

@gautamdsheth
Copy link
Collaborator

Can we use -OpenDocumentsMode as parameter name ? Maybe also add an additional check to determine if the list is actually document library , I think the template enum was 101, if not add warning this wont work ?

@KoenZomers
Copy link
Collaborator Author

Changed the parameter name as suggested. Just tested doing this for a normal list and it doesn't return any errors. I personally think we might be introducing more problems than we're solving things by trying to add a check for the type of list. It probably works on other types as well, what if content type inherited from, etc. I'm tempted to leave the check out. What do you think?

@KoenZomers
Copy link
Collaborator Author

I now see we're actually using the doclib check already, so I guess it does work well:

if (list.BaseType == BaseType.DocumentLibrary)

Let me add it for this PR too then.

@gautamdsheth gautamdsheth merged commit 532f66d into pnp:dev Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants