web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Set default value of Quantity and Unit on Opportunity Product

(0) ShareShare
ReportReport
Posted on by 608

We have customized our Products and Opportunity Products to fit our business needs.  We won't be using the Quantity or Unit fields at all in calculating totals.  Since they are required fields, I want to pre-populate the default values when an Opportunity Product is added.  I created a Business Rule as follows:

IF

Unit <> "Mb"

THEN

Set the default value of Unit to "Mb"

Set the default value of Quantity to 1.00000

I also tried setting the Field value but neither works as I would like.  The Unit field is always empty until I manually populate it, and I get an Information Dialog box saying, 'The value in the Quantity box has changed from "1" to "1" due to an update to the decimals supported in the product. ' 

The Quantity field does populate with 1.00000 after the user clicks OK, but I don't want the user to have to click off the dialog box every time they add another product to the Opportunity.

I have set all Products to the Unit Group Mb, and Decimals Supported is 5. 

Why won't these fields populate using the Business Rule?

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    Hi Barbara,

    the opportunity product form is a particular form, it has some issues when settings some of the fields, one of them is in fact Unit as the form can handle both existing product and write-in so the Unit field is not set with Business Rules.

    Before to my customers I often suggest a small JavaScript to set the unit field with a short delay (like 200 milliseconds) but with the current subgrid for opportunity products (where you add a product directly from the subgrid) a plugin on the create event of the opportuntiy product to set the unit and the quantity is another solution.

    Sadly opportunity product is not available inside workflows.

    hope it helps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans