Do you have feedback on our new interface?
Do you have feedback on our new interface? Let us know HERE
Highlighted
candida
New Member.
305 views

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

 

0 Likes
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;

      }

  }

}

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.