cancel
Showing results for 
Search instead for 
Did you mean: 

GetObjectCode

Former Member
0 Kudos

The GetObjectCode returns the DocEntry. is there anyway I can get the newly added DocNum ? Because it returns 0

if (Document.Add() != 0)

{

oCompany.GetLastError(out ErrorCode, out ErrorMsg);

rtfResult.Text += (FortSum.General.IsFrench ? "Fichier : " : "File : ") + SelectedFile.Trim() + ", " + ErrorCode.ToString() + " " + ErrorMsg + Environment.NewLine;

}

else

{

Need the newly added DocNum !

//rtfResult.Text += "Document #" + ObjectCode + (FortSum.General.IsFrench ? " créé avec succès..." : " created successfuly...");

rtfResult.Text += "Document " + (FortSum.General.IsFrench ? " créé avec succès..." : " created successfuly...");

MoveToBackup();

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marc,

There's no standard way to get the DocNum. You'll have to query the particular object table or use the GetByKey(newDocEntry) method of the Document to get the DocNum as a property.

HTH,

Ian

Former Member
0 Kudos

Thank you for your answer. I will try this GetByKey else I will read from the table then.

Answers (0)