Menu

Automatically default price after product selection

0 votes

Hi, I need implement a master-detail form (invoices - invoices lines).

In invoice lines when select the product then price product must be put into field line price in form invoices lines.

If i don't work with ajax for create this function I think that use the insert or modify trigger in sql server invoice lines for select the product price and put it into invoice line price, but this function only will be executed when click the "save change" button and I need to execute when the field product is selected.

It is possible?

Thanks.

in Customization by (180 points)
edited by

1 Answer

0 votes

Assuming that the purpose is to simply make the user is aware of the product price then the solution would be to include the price as one of the columns on the lookup field.

If the user needs to be able to override the price then you could have a separate price column on the detail.

When the user saves the record one of two things will happen:

  1. If the user didn't specify an override price then the trigger can copy in the price from the product table.
  2. If the user specified an override price then the specified price would remain.
by (65.2k points)
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...