Skip to content

Example on how to add Fields to an existing item? #85

@almostjulian

Description

@almostjulian

I've been trying to add a new field to an existing item without much success.

var items = onePasswordClient.GetItems(myVault)
var item = items.First(x => x.Title == "My Title")

//As is the existing fields collection is null, I need to do this to get fields
item = onePasswordClient.GetItem(item, myVault)

item.Fields.Add(new Field("My new field", FieldType.Concealed, "My New value"));
// This doesn't actually edit the item with the new field
onePasswordClient.EditItem(item, myVault);

Do I need to do something differently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions