on 03-08-2012 11:03 PM
Hi all,
Anyone know how to get the docentry or docnum?
I successfully add the draft through DI API. After user click the ADD button, the draft will be added. Then, I like to link that ODRF.DocEntry to the field in my user defined object.
What number is the docentry which the user just added?
How can I approach it?
Thanks
Gary
Edited by: garywong0224 on Mar 9, 2012 10:20 AM
Edited by: garywong0224 on Mar 9, 2012 10:21 AM
Hi Gary,
There's a method in the DI API Company object that returns the key value of the last object you added (in your current DI API session). For a marketing document it will return the DocEntry. If you need the DocNum then you'll have to query the appropriate header table using a recordset object based on the DocEntry you've been given.
string docEntry = "";
sbo.Company.GetNewObjectCode(out docEntry);
Kind Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.