TypeDescription Attribute Type

The 1C:Enterprise developers forum

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

I have an attribute of TypeDescription type. The user chooses there some documents (one or several – it doesn’t matter). I want to provide a list of documents of the selected type, for example Customer Order.
The 1C:Script:

Code
Document = ObjectTypes.Types().Get(0);

It gives the document type. But how can I open the list of documents of this type?

 
#2
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Sep 16, 2011
Company: individual

If you need something like that?

Code
DocumentsTableName = Metadata.FindByType(YourType).FullName();
Query = New Query;
Query.Text = "SELECT Ref FROM " + DocumentsTableName;
For Each QueryResultRow In Query.Execute().Unload() Do
  // your code here
EndDo;

 
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.