C++ API: Initiate LNUniversalID( const LNString &unidstring )

Hi

I have an application where I provide the UNID of a document as parameter.

The C++ program should then fetch the document with this UNID and add a value.

The problem is, how do I have to initiate the LNUniversalID class?

LNUniversalID unid( “myuniversalid”);

status = GetDocument( UNID *unid, &doc );

This statement doesnt work.

Could somebody tell me how to do it?

Thank you very much.

P.S. That’s my first C++ API project so I’m sorry if the solution is obvious…

Regards,

Chris

Subject: C++ API: Initiate LNUniversalID( const LNString &unidstring )

If “status = GetDocument( UNID *unid, &doc );” is your exact statement, you should add a qualification to the GetDocument call, like Database.GetDocument(…). Of course the Database object should refer to an opened database.

PS: Don’t forget to open the obtained document before you can do anything with it. And close it afterwards.