The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Active user
Rating: 2
Joined: Oct 15, 2024
Company:

I created a new document named InvoiceExchange. When I choose a customer and click on SalesInvoice, all sales invoices associated with that customer appear. However, after selecting one sales invoice and attempting to add another, the previously selected invoices still appear as options.

What I want is for the previously selected invoices to not be selectable again or to not appear in the options at all. How can I achieve this?

 
#2
People who like this: 0 Yes / 0 No
Administrator
Rating: 28
Joined: Oct 3, 2019
Company:

Dear Gigha,

clarify please how you open the list of invoices for only one Client? And then I will tell you how to implement what you want :)

 
#3
People who like this: 0 Yes / 0 No
Active user
Rating: 2
Joined: Oct 15, 2024
Company:

Quote
Dear Gigha,

clarify please how you open the list of invoices for only one Client? And then I will tell you how to implement what you want

I use ChoiceParameterLinks in field InvoiceListDetailSalesInvoice.
In ChoiceParameterLinks, I choose :
Name : Filter.Counterparty
Attribute : Object.Customer
Edit mode of the link value : Clear

 
#4
People who like this: 0 Yes / 0 No
Administrator
Rating: 28
Joined: Oct 3, 2019
Company:

Hello Gigha,

thank you for your answer, I understand and you have done everything correctly.

But to implement the functionality that you want, we need to do it a little differently...

For the list form of the document "InvoiceExchange", we should switch the DynamicList "List"  to use custom queries. We will pass a list of already added documents to this query, and they will not be shown then.

Do you know how to do this?

Download 1.png (58.52 KB)
 
#5
People who like this: 0 Yes / 0 No
Active user
Rating: 2
Joined: Oct 15, 2024
Company:

Quote
Do you know how to do this?

I don't know. What should I do after I checked CustomQuery?

 
#6
People who like this: 0 Yes / 0 No
Administrator
Rating: 28
Joined: Oct 3, 2019
Company:

Hello Gigha,

for example, take a look at how this is implemented in the Counterparties catalog (Scr_1).

The logic there is as follows: we write a query that returns a certain list, and then this list is displayed on the form.

Download Scr_1.png (98.55 KB)
 
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.