editItem - Methods - Author API

Author API Methods

editItem()

Navigates to the Item editor and loads the specified Item.

You would want to use this method so that you can build a custom Item edit button in your own application, for example.

Examples

authorApp.editItem('My Item reference to edit');

Arguments

  • itemReference string

    The Item reference used to identify the Item.

    Maximum length is 150 characters.

  • create boolean

    Controls the behavior when the specified itemReference is not found in the Item bank.

    This argument is not supported in the Activity editor view.

    Default: false

    Possible values

    • true

      A new Item will be created with the passed itemReference as its reference.

    • false

      The operation will fail with an error indicating that the itemReference could not be found.

Return value

None (undefined).

Caveats

In cases where the author has access to multiple Item banks, the specified Item to be edited must belong to the current API Consumer that initialized Author API. See Security and Authentication for more information.

Related articles

  • The createItem() method, which navigates to a new Item editor view, ready for an author to create a new Item.
Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.