web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    RE: Opportunity Unique Identifier

    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
    RE: Opportunity Unique Identifier

    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
    RE: Opportunity Unique Identifier

    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
    RE: Opportunity Unique Identifier

    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
    RE: Opportunity Unique Identifier

    In the form you can use

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

  • sandeepc Profile Picture
    5,514 on at
    RE: Opportunity Unique Identifier

    where do i get this ID on the form

  • sandeepc Profile Picture
    5,514 on at
    RE: Opportunity Unique Identifier

    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
    RE: Opportunity Unique Identifier

    function GetID()

    {

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

    }

  • sandeepc Profile Picture
    5,514 on at
    RE: Opportunity Unique Identifier

    3580.6.PNG

    3580.6.PNG

  • sandeepc Profile Picture
    5,514 on at
    RE: Opportunity Unique Identifier

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
UllrSki Profile Picture

UllrSki 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans