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

Update List Item type Choice throws error #261

Closed
SteveRoach opened this issue Nov 17, 2021 · 1 comment
Closed

Update List Item type Choice throws error #261

SteveRoach opened this issue Nov 17, 2021 · 1 comment
Labels

Comments

@SteveRoach
Copy link

I have a web app with a multi-choice checkbox. When I attempt to Update my SP List, it throws an error. This has been working and, as far as I know, no changes have been made on the app side. Most recent successful update was about 2 weeks ago. I've attached the error message.

error_message.txt

@vgrem vgrem added the bug label Feb 1, 2022
vgrem added a commit that referenced this issue Feb 5, 2022
@vgrem
Copy link
Owner

vgrem commented Feb 5, 2022

Greetings,

starting from 2.5.3 version the support for working with multi-valued choice fields has been enhanced.

FieldMultiChoiceValue type has been introduced and recommended when dealing with multi-choice field values, here is an example:

$list = $ctx->getWeb()->getLists()->getByTitle("Tasks");

$taskProps = array(
    'Title' => "New task",
    'TaskCategories' => new FieldMultiChoiceValue(["Event", "Reminder"])
);
$item = $list->addItem($taskProps)->executeQuery();

@vgrem vgrem closed this as completed Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants