wongsk27 Contributor.
Contributor.
421 views

.NET SDK - Record.SetAutoCheckin problem

Hi,

Does anybody know how to use .NET SDK - Record.SetAutoCheckin properly? I have been having a problem to use SetAutoCheckin in a reliable way.

I have written a C# windows console application which will checkout a MSWord document, and ask HP RM to automatically check in the word document after the user has finished editing the document. The following is the code I use to do checkout:

 


Database hprmDatabase = null;

OfflineRecord offlineRecord = null;

Record record = null;
hprmDatabase = new Database();
TrimURI trimURI = new TrimURI(long.Parse(uri));
if (trimURI != null){
record = new Record(database, trimURI);

if (record != null){
offlineRecord = new OfflineRecord(record, true);

record.SetAutoCheckin(offlineRecord.FullFileName);
}}

At code work well when I have HP Records Manager application is running on my machine.

If I don't have HP Records Manager running, then run my console application to check out a word document, when the user close the document, it will not automatiically checkin the document.

Is this a bug in SetAutoCheckin? or SetAutoCheckin requires the user has the HP Records Manager is running on my machine?

I am currently using testing both Windows 7 x64bits  and 7x32bits with

HP RPM client - 8.1.0 and 8.1.1.

Any comments will be appreciated . Thanks

Brian

 

 

 

 

 

 

 

0 Likes
2 Replies
Established Member.. Jason Boswell
Established Member..

Re: .NET SDK - Record.SetAutoCheckin problem

The TRIMWatcher process does need to be running to execute the autocheckin. Here is an little example i wrote on the online support site that worked in v7, should be the same in v8.

https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/KM1236465

0 Likes
Highlighted
wongsk27 Contributor.
Contributor.

Re: .NET SDK - Record.SetAutoCheckin problem

Hi Jason,

Thanks for your comments, I checked the link the posted, the example seems using COM Library but not .NET SDK. Do you have example which shows in .NET SDK?  I am using the HP.HPTRIM.SDK package at the moment.

Regards

Brian

 

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.