Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Add notifications on SalesOrders

Forum

Search UsersRules
Add notifications on SalesOrders
#1
Active user
Points:: 0
Joined:: Oct 15, 2024

Add notifications on SalesOrders.
In Document SalesOrder, in DocumentForm.
When create Sales Order and then click button Post, a notification appears when The consumer has an SalesInvoice whose payment status is overdue. After that, button Post and Generate can't be click. (Button become readonly).

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

Dear Gigha,

in 1C it works a little differently. We can't block the Post button (well, it's possible, but it's not done that way), and all checks are usually performed during the process when the user tries to write a document.

For example, the "BeforeWrite" procedure in the object module is perfect for performing such checks (see screenshots)

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

Quote
Dear Gigha,

in 1C it works a little differently. We can't block the Post button (well, it's possible, but it's not done that way), and all checks are usually performed during the process when the user tries to write a document.

For example, the "BeforeWrite" procedure in the object module is perfect for performing such checks (see screenshots)

I create a new sales order. The customer name in the sales order is Pleer Düsseldorf. After that, I click "Post" or "Generate." If Pleer Düsseldorf has a sales invoice with an overdue payment status, a notification appears. After that, the "Post" and "Generate" buttons become read-only and cannot be clicked. How I can I do that?

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

Quote
Gigha wrote:
After that, the "Post" and "Generate" buttons become read-only and cannot be clicked. How I can I do that?

In short - no way.

The check for the user having unpaid payments should be performed at the time of document posting (or at the time of recording). If there is an overdue payment - then we do "Cancel = True" and Post (or Write) procedure is not performed.

There is another option for doing such a check: when the user selects a Customer, at this moment the program can check if this Client has overdue payments and issue a message to the user.

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

Quote
There is another option for doing such a check: when the user selects a Customer, at this moment the program can check if this Client has overdue payments and issue a message to the user.

How can I implement this option?

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

Please look at the screenshots.

This is an example from 1C:Drive. When selecting a counterparty, the "ProcessCounterpartyChange" procedure is triggered, which performs various necessary checks. This is where you can insert the functionality you need.

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



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