Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Getting Error when calling Mscrm.Form.opportunity.MarkAsWon method!

Posted on by

Hello All Experts,

I need to know how to overcome the issue.

while calling the method i am getting below error.

Unable to get property 'MarkAsWon' of undefined or null reference

*This post is locked for comments

  • Verified answer
    EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: Getting Error when calling Mscrm.Form.opportunity.MarkAsWon method!

    I think i got the error.

    actually if we look into the OpportunityClose Method , it starts with Capital letter O,

    while it should be small letter o.

    so method will be as below.

    Mscrm.CommandBarActions.opportunityClose(vaule).

  • Suggested answer
    Andreas Cieslik Profile Picture
    Andreas Cieslik 9,265 on at
    RE: Getting Error when calling Mscrm.Form.opportunity.MarkAsWon method!

    Reading this post:

    blog.sonomapartners.com/.../creating-your-own-custom-privilege-settings-in-dynamics-crm-2011.html;utm_medium=feed&utm_campaign=Feed%3A+typepad%2Fsonoma+%28Sonoma+Partners+Microsoft+CRM+Blog%29

    You might have missed something in your Ribbon Workbench configuration. Maybe you can post us your configuration XML or compare it to whats in the post above.

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Getting Error when calling Mscrm.Form.opportunity.MarkAsWon method!

    Hi,

     have a look at this post:

    mahadeomatre.blogspot.ca/.../ribbon%20button

     I think it's very similar to what you are doing (you may be missing step #3)

  • EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: Getting Error when calling Mscrm.Form.opportunity.MarkAsWon method!

    But this method throwing below error.

    Object doesn't support property or method 'OpportunityClose'

  • EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: Getting Error when calling Mscrm.Form.opportunity.MarkAsWon method!

    I think i need to use below method.

    Mscrm.CommandBarActions.opportunityClose(vaule).

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans