Returns an Item object that matches the ItemType name and keyed name for the Item.
Namespace:
Aras.IOM
Assembly:
IOM (in IOM.dll) Version: 11.0.0.6296
Syntax
C# |
---|
public Item getItemByKeyedName(
string itemTypeName,
string keyedName
) |
Visual Basic (Declaration) |
---|
Public Function getItemByKeyedName ( _
itemTypeName As String, _
keyedName As String _
) As Item |
J# |
---|
public Item getItemByKeyedName(
String itemTypeName,
String keyedName
) |
JScript |
---|
public function getItemByKeyedName(
itemTypeName : String,
keyedName : String
) : Item |
Parameters
- itemTypeName
- Type: System..::.String
Name of the ItemType.
- keyedName
- Type: System..::.String
Keyed name for the searched item.
Return Value
If request to the server failed the method returns an "error" item; if no item with specified type and id
found in the database the method returns 'null'; otherwise the method returns the found item.
Remarks
Examples
C#
CopyC#
...
string type = "Part";
string keyedName="part1";
Item result = myInnovator.getItemByKeyedName( type, keyedName );
string status_msg = string.Empty;
if( result == null )
status_msg = string.Format( "Item of type '{0}' with keyed name '{1}' was not found", type, keyedName );
else if( result.isError() )
status_msg =
string.Format( "Request to find item of type '{0}' with keyed name '{1}' has failed: {2}", type, keyedName, result.getErrorDetail() );
else
status_msg = string.Format( "Item of type '{0}' with keyed name '{1}' was successfully found", type, keyedName );
...
Exceptions
Exception | Condition |
---|
System..::.ArgumentException |
-
Item type is not specified.
-
Keyed name is not specified.
|
See Also