How to find out that the new document form is opened

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jan 17, 2013
Company: Alaska Fitness

I need to define whether a new document is created or an existing one is opened. How can I do this in the document form?

 
#2
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Aug 17, 2012
Company: Gaztron LLC

Hi, Jacob!

Try this:

Code
      IsWritten = ValueIsFilled(Object.Ref);

 
#3
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Normally it is required to define if the new object is created or not when the new object should be filled. For this use the object module:

Code
Procedure Filling(FillingData, StandardProcessing)
   // Fill new or refilled object here
EndProcedure

If the form item visibility or other form changes should be performed for new objects, use the Parameters.Key.IsEmpty():
Code
&AtServer
Procedure OnCreateAtServer(Cancel, StandardProcessing)
   If Parameters.Key.IsEmpty() Then
      // Change item visibility and so on
   EndIf;
EndProcedure

&AtClient
Procedure OnOpen(Cancel)
   If Parameters.Key.IsEmpty() Then
      // Change item visibility and so on
   EndIf;
EndProcedure

 
#4
People who like this:0Yes/0No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

Code
Object.Ref.IsEmpty()

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
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.