Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

CRM 365 Ignoring Default value on Opportunity Models

Posted on by 195

Hi All

*CRM 365, On-Premise, 8.2.0.749*

I have a new challenge, this time with Opportunity models where CRM ignores 2 default values of fields.

On a Opportunity, via the subnavigation we go to the associated Opportunity models screen.
When we try to add a new Opportunity model, the Opportunity model form opens and two fields ignore defaults set on field detail level

  • 'Select product' is set to "Write-in" while the default value is set to "Existing product"
  • 'Pricing' is set to "Override Price" while the default value is set to "Use Default"

As a workaround I tried to create a businessrule which sets the values to what I want them to be, but this either has no effect or is overwritten by this behavior too..

Any ideas?

*This post is locked for comments

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: CRM 365 Ignoring Default value on Opportunity Models

    Hi Erik,

    on page load write a javascript function and set the value of select product and pricing field, in your function use set time out and set the value of fields after 4-5 seconds, and try if it works, because it may be getting set from some where.

    function onload()

    {

    setTimeout(function()

    {

    //set the default value of your fields// below is the code for setting lookup value in javascipt

    var object = new Array();

    object[0] = new Object();

    object[0].id = fieldId;

    object[0].name = value;

    object[0].entityType = fieldType;

    Xrm.Page.getAttribute("fieldName").setValue(object);

    },

    4000);

    }

    if you find it helpful, please mark as verified.

    Thanks,

    Shahbaaz

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans