Home > Contents > Index > 
ASSET.CANEDIT
Checks whether a publish operation, which prevents the specified asset from being edited, is in progress.Syntax
<ASSET.CANEDIT NAME="asset name" /> [TYPE="asset type"] [OBJECTID="asset id"]Parameters
NAME (required)- Name of previously loaded asset.
 
TYPE (required if name is not used)- Input. Asset type of the asset. Either
 type+objectidor name must be supplied to identify the asset.
OBJECTID (required if name is not used)- Input. Asset id of the asset. Either
 type+objectidor name must be supplied to identify the asset.
Description
The
asset:canedittag checks the PubSession table for any running (status='R") publish operations. If the specified asset is approved for publishing in the target for any of those running publish sessions, the asset cannot be edited.errno
The possible values of
errnoinclude:
 Value Description -10004 A required parameter is missing. -10005 The requested object is not in the object pool (is not loaded intomemory). -12034 Publish in progress.Example
This example checks whether an asset can be edited and displays an error if the asset cannot be edited.
<ASSET.LOAD NAME="myArticle" TYPE="Article" OBJECTID="123456789012"/> <ASSET.CANEDIT NAME="myArticle"/> <if COND="IsError.Variables.errno=true"> <then> <callelement NAME="OpenMarket/Xcelerate/UIFramework/Util/ShowMessage"> <argument NAME="elem" VALUE="EditNotAllowed"/> <argument NAME="severity" VALUE="info"/> <argument NAME="AssetType" VALUE="Article"/> <argument NAME="id" VALUE="123456789012"/> </callelement> </then> </if>This example does the same without loading the asset.
<ASSET.CANEDIT TYPE="Article" OBJECTID="123456789012"/> <if COND="IsError.Variables.errno=true"> <then> <callelement NAME="OpenMarket/Xcelerate/UIFramework/Util/ShowMessage"> <argument NAME="elem" VALUE="EditNotAllowed"/> <argument NAME="severity" VALUE="info"/> <argument NAME="AssetType" VALUE="Article"/> <argument NAME="id" VALUE="123456789012"/> </callelement> </then> </if>See Also
Home > Contents > Index > ![]()
FatWire XML Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.