Difference Between New Document and Edit Existing

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company:

How to find out in the form module, if the new document is created or the existing one is opened for editing?

 
#2
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Jul 20, 2011
Company:

DocumentObject.<Document name>
IsNew
Syntax:

IsNew()
Returned value:

Type: Boolean.
If True, the document has not yet been written; if False,the document has already been written.
Description:

Determines whether or not document has been written to the database.

Availability:

Server, thick client, external connection.
Example:

If ExpenseBill.IsNew() Then
   ExpenseBill.Write();
EndIf;

 
Subscribe
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.