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: 29
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: 29
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: 29
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.

/* --- ФИКС ЗАГОЛОВКОВ ДОКУМЕНТАЦИИ (BRUTE FORCE) --- */ /* Цепляемся за все возможные контейнеры Битрикса */ .content h1, #content h1, .workarea h1, .content h2, #content h2, .workarea h2, .content h3, #content h3, .workarea h3, .content h4, #content h4, .workarea h4, .content h5, #content h5, .workarea h5, .content h6, #content h6, .workarea h6 { display: block !important; font-weight: 700 !important; color: #222 !important; text-transform: none !important; margin-top: 1.5em !important; margin-bottom: 0.5em !important; line-height: 1.2 !important; } /* Явно задаем размеры, чтобы перекрыть "font-size: 100%" */ .content h1, #content h1 { font-size: 28px !important; } .content h2, #content h2 { font-size: 24px !important; } .content h3, #content h3 { font-size: 22px !important; } .content h4, #content h4 { font-size: 20px !important; } .content h5, #content h5 { font-size: 18px !important; } /* Ваш случай (5 решеток) */ .content h6, #content h6 { font-size: 16px !important; } /* Если Битрикс или редактор засунули внутрь h5 тег span или font */ .content h5 *, #content h5 *, .workarea h5 * { font-size: inherit !important; color: inherit !important; font-weight: inherit !important; } /* --- СТИЛИЗАЦИЯ ТЕКСТА (Markdown Style) --- */ /* Ссылки в тексте делаем более заметными */ .content a:not([class]) { color: #005aa0; text-decoration: none; border-bottom: 1px solid rgba(0, 90, 160, 0.2); } .content a:not([class]):hover { border-bottom-color: #005aa0; } /* Списки (чтобы не прилипали) */ .content ul, .content ol { margin-bottom: 15px !important; padding-left: 20px !important; } .content li { margin-bottom: 5px !important; }