Content Manager User Discussions

Upgrade from TRIM.sdk to HP.HPTRIM.SDK

New Member.

Upgrade from TRIM.sdk to HP.HPTRIM.SDK

Need corresponding functions for the following.  Thanks

protected TRIMSDK.Database dataBase = new Database();

 protected HP.HPTRIM.SDK.Database dataBase = new Database();  -- this is ok

TRIMSDK.FieldDefinitions types;

types = dataBase.MakeFieldDefinitions();


TRIMSDK.FieldDefinition custFieldType_DocType = types.Item(0);
TRIMSDK.FieldDefinition custFieldType_AppType = types.Item(0);
TRIMSDK.FieldDefinition custFieldType_AppSubType = types.Item(0);
TRIMSDK.FieldDefinition custFieldType_CaseNo = types.Item(0);
TRIMSDK.FieldDefinition custFieldType_Applicant = types.Item(0);

for (typeCounter = 0; typeCounter < types.Count; typeCounter++)
if (types.Item(typeCounter).Name == "Document Type")
custFieldType_DocType = types.Item(typeCounter);


Respected Contributor.. christopher cri Respected Contributor..
Respected Contributor..

Re: Upgrade from TRIM.sdk to HP.HPTRIM.SDK


This is a bit of hard question to answer as I'm not exactly sure what your code is doing, you'd be better of asking for a sample of code that did a specific task. Here is some code that is roughly equivalent to yours, I hope it gives you a starting point. 

TrimMainObjectSearch tmos = new TrimMainObjectSearch(dataBase ,BaseObjectTypes.FieldDefinition);


//you can now use foreach to interate through

// foreach(FieldDefinition udf in tmos)

// {}

// or you can enumerate if you want to

using( IEnumerator<FieldDefinition> type = (IEnumerator<FieldDefinition>) tmos.GetEnumerator() )


    FieldDefinition custFieldType_DocType = type.Current;

  FieldDefinition custFieldType_AppType = type.Current;

  foreach (FieldDefinition UDField in tmos )


    if (UDField.Name == "Document Type")


      custFieldType_DocType = UDField;





Top Contributors Last 30 Days