Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
countnazgul
Contributor III
Contributor III

Weird Sense API behaviour?

Hi all,

im noticing weird behaviour using few api methods. The idea is to delete measure from specific document and then recreate if.

Here is the workflow im following:

* Using the Engine API Explorer im invoking the GetMeasure method and copy the string for the returned generic object. ( Im using the Executive Dashboard so you can check with measure id = bUft)

* DeleteMeasure - with id bUft

* CreateMeasure - pasting the generic object from step 1

* at this point im expecting to have exactly the same measure and the api returns almost exactly the same object. The only difference is that the new "imported" measure have a different id. For example "95ddc165-9a5d-42a4-a1cb-337e36511fd4" instead "bUft"

* try GetMeasure again with id = bUft - the api returns null


After this im trying:

* invoke DoSave() method

* refresh the page with the api explorer

* check the GetMeasure again - still null

* try CreateMeasure again

* the measure is created with the correct id (bUft)

Interesting bit is that this is happening with Measures, Dimensions and MasterObjects. For the other objects ( like sheets, snapshots etc.) this is not the case. Deleting the object and recreating it right after this (without invoking DoSave or SaveObjects methods) is creating exactly the same objects.

Am I missing something?

Thanks!

Stefan

10 Replies
countnazgul
Contributor III
Contributor III
Author

Thanks Erik I will.

For future reference: I've solved it by modifying the existing objects instead of deleting them using setProperties and

setFullPropertyTree

Stefan