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)

Opportunity Unique Identifier

(0) ShareShare
ReportReport
Posted on by 5,514

in the fields i have an OpportunityID which is an unique identifier of Opportunity but i am unable to see it on opportunity form.

what i need to do ? to make visible of that field in opportunity form

idop.PNG

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Hi

    This is the record GUID. This will not be available in the form.

    You can obtain the value using

    Xrm.Page.data.entity.getId();

    https://community.dynamics.com/crm/f/117/t/134587

  • sandeepc Profile Picture
    5,514 on at

    function SetGuid() {

       if (Xrm.Page.getAttribute('new_oppid').getValue() == null) {

           var guid = Xrm.Page.data.entity.getId();

           Xrm.Page.getAttribute('new_oppid').setValue(guid)

       }

    }

    added this code but no error but still not showing unique id.  i added field opportunity field with single line of text

  • Verified answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Hi

    This is a GUID value. I am not sure, why you want to display this value in the form. The end user might not be interested in this value. You can obtain this value from the Email a Link button as well.

    They are using a custom field new_oppid (Single Line of Text) in this example.

  • sandeepc Profile Picture
    5,514 on at

    ok ok understood. so if i need to get unique id for opp. what will be the full code i need to add

  • Verified answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    In the form you can use

    Xrm.Page.data.entity.getId();

  • sandeepc Profile Picture
    5,514 on at

    where do i get this ID on the form

  • sandeepc Profile Picture
    5,514 on at

    Xrm.Page.getAttribute("new_uniqueid").setValue(result.new_UniqueID ? result.new_UniqueID : null); will this give the solution?

  • sandeepc Profile Picture
    5,514 on at

    function GetID()

    {

    Xrm.Page.getAttribute("new_uniqueid").setValue(result.new_UniqueID ? result.new_UniqueID : null);

    }

  • sandeepc Profile Picture
    5,514 on at

    3580.6.PNG

    3580.6.PNG

  • sandeepc Profile Picture
    5,514 on at

    should i need to add N:1 Relation?? fr opp id to opp id primer key

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans