1 Reply Latest reply on Jan 10, 2011 4:47 PM by LarryR

    Fail Import During PostWorkToMainProcess

      We perform many custom validations during the Import phase, mostly in several different events in the ImportAction script. When a submission does not pass a given validation, we use mProcessLog to set the Import status to failure in most Events, however, I can't get the following to work in the PostWorkToMainProcess ImportAction Event:

      API.MaintenanceMgr.mProcessLog strLoc, strCat, strPer, 1, False, "ImportAction/PostWorkToMainProcess error", Now()

      Is there a way to set the Import status to failure in either the ImportAction/PostWorkToMainProcess or ImportAction/EndProcess Events without scripting a purposely erroneous command? For instance, I can insert RES.PcolScriptInfo.Item("ScriptInfo").ColFlds.Item("Cancel").varValue = True into the PostWorkToMainProcess Event, which will cause the Import to fail because PostWorkToMainProcess is not cancelable, however, I also get an InfoBar Automation Error message that would incite users to call the help desk. I definitely want to avoid that.

      Any info is appreciated. Thanks in advance!