Content Manager User Discussions
cancel

Upgrade from TRIM.sdk to HP.HPTRIM.SDK

candida
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();

types.SelectAll();

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);
}

 

1 REPLY
Respected Contributor.. christopher cri Respected Contributor..
Respected Contributor..

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

Hi,

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);

tmos.SetSearchString("all");

//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;

      }

  }

}