When adding an export script to a document class the RunUI method gets fired and shows the setup form. When removing the script this happens too. I would like to prevent it because there is no need for it.
In my ActionEvent
method I could create a switch for the KfxActionValue
.
I don't want to show the UI when removing the script but I want to show it when adding the script or when I want to edit it.
The documentation is not very helpful as you can see here
I took the Sharepoint example and the KCEC Text example and created this
public KfxReturnValue ActionEvent(KfxActionValue actionID, string data1, string data2)
{
try
{
bool showUI = false;
switch (actionID)
{
case KfxActionValue.KFX_REL_INDEXFIELD_INSERT:
case KfxActionValue.KFX_REL_INDEXFIELD_DELETE:
case KfxActionValue.KFX_REL_BATCHFIELD_INSERT:
case KfxActionValue.KFX_REL_BATCHFIELD_DELETE:
showUI = true;
break;
//case KfxActionValue.KFX_REL_UNDEFINED_ACTION:
//case KfxActionValue.KFX_REL_DOCCLASS_RENAME:
//case KfxActionValue.KFX_REL_BATCHCLASS_RENAME:
//case KfxActionValue.KFX_REL_INDEXFIELD_RENAME:
//case KfxActionValue.KFX_REL_BATCHFIELD_RENAME:
//case KfxActionValue.KFX_REL_RELEASESETUP_DELETE:
//case KfxActionValue.KFX_REL_IMPORT:
//case KfxActionValue.KFX_REL_UPGRADE:
//case KfxActionValue.KFX_REL_PUBLISH_CHECK:
//case KfxActionValue.KFX_REL_START:
//case KfxActionValue.KFX_REL_END:
//case KfxActionValue.KFX_REL_FOLDERCLASS_INSERT:
//case KfxActionValue.KFX_REL_FOLDERCLASS_RENAME:
//case KfxActionValue.KFX_REL_FOLDERCLASS_DELETE:
//case KfxActionValue.KFX_REL_TABLE_DELETE:
//case KfxActionValue.KFX_REL_TABLE_INSERT:
//case KfxActionValue.KFX_REL_TABLE_RENAME:
//default:
// break;
}
if (showUI)
{
return RunUI();
}
return KfxReturnValue.KFX_REL_SUCCESS;
}
catch (Exception e)
{
setupData.LogError(e.ToString());
throw e;
}
}
but I'm not sure if this is correct. It works. But where can I get more information about it?