Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Selection DocumentRef.SalesInvoice can only be selected once

Forum

Search UsersRules
Selection DocumentRef.SalesInvoice can only be selected once
#1
Active user
Points:: 0
Joined:: Oct 15, 2024

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?

Profile
#2
Administrator
Points:: 0
Joined:: Oct 3, 2019

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 :)

Profile
#3
Active user
Points:: 0
Joined:: Oct 15, 2024

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

Profile
#4
Administrator
Points:: 0
Joined:: Oct 3, 2019

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?

Profile
#5
Active user
Points:: 0
Joined:: Oct 15, 2024

Quote
Do you know how to do this?

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

Profile
#6
Administrator
Points:: 0
Joined:: Oct 3, 2019

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.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.