Zum Hauptinhalt gehen

Fail to create a PageFolder programmatically

Kommentare

2 Kommentare

  • Zendesk API User
    Author: seegers - 7/26/2019 13:23

    Hi Andres,

    I am not sure which FS Version you are using, but I can give some pointers anyway:

    - The "StoreElementAgent" is part of the develop-api not the stable access-api, so it might not be accessible in your version

    - Did you check if you actually have a valid "StoreElementAgent" or null?

    - Did you check if you actually have a valid "parentFolder" or null?

    - The function to create a new folder is here "createPageFolder" (and differs for other folder types).

    Hope this helps,

    René

    0
  • Zendesk API User
    Author: agarcia - 7/26/2019 14:16

    Hi seegers

    It turns out the last one was the key.

    StoreElementAgent & parentFolder were valid objects.

    Now it's working with:

    folder = parentFolder.createPageFolder("NewFolder");

    There was a mistake in the method name, as you pointed out.

    However, it was still failing.

    Another problem seemed to be that the parent folder wasn't released.

    And without:

    folder.save();

    Thanks for your suggestions and help!,

    Andres.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.