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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Expose contact id for each contact on the form

(0) ShareShare
ReportReport
Posted on by

Does dynamics allow you to expose the contactid for each contact by publishsing the oob contactid field on the form? I am trying to accomplish this however when I go to the form and look at the available fields on the right, this oob field doesn't show up.

I also tried to trick the system by creating a new field and a workflow to copy the data from oob contact id field to this new field but surprisingly the workflow is coping the name and not the id. (Note that I have used the correct field which has contactid)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hello there :

    That's expected behaviour - you will have to create a field and fill it using a plugin or javascript.

    other one easy way is mentioned here without any script or code : www.powerobjects.com/.../how-to-derive-and-expose-a-record-guid-on-your-forms-using-oob-functionality  

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    You can't show out of the primary key field to form, but can easily get show it in text field using on load script like below

    Xrm.Page.getAttribute("textfieldname").setValue=Xrm.Page.data.entity.getId();

  • Community Member Profile Picture
    on at

    Any idea why this is the expected behavior or why MS doesn't let you do it purposefully?

  • Verified answer
    Rawish Kumar Profile Picture
    13,758 on at

    The only reason i can think of is - its not "User Friendly". No business user would want to see it on the form.

  • Community Member Profile Picture
    on at

    urm...One of my client has this requirement but anyway that functional way of doing it looks easy enough...THanks much :)

  • Community Member Profile Picture
    on at

    Okay, I implemented the way it was mentioned on that link however the new field Record URL (singlelineoftext, URL) is exceeding the maximum characters (100 by default) which eventually fails my workflow. :/ 

    Error- A validation error occurred.  The length of the 'new_recordurl' attribute of the 'contact' entity exceeded the maximum allowed length of '100'.

    Any suggestions, please?

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi,

    You can very well increase the length of the field from field definition.

  • Community Member Profile Picture
    on at

    Sorry I should have mentioned this on my last comment but dynamics doesn't let me do that. It throws a generic SQL error. I read below blogsbut still no luck :(

    community.dynamics.com/.../225105

    community.dynamics.com/.../167733

    Error-

    Unhandled Exception: System.ServiceModel.FaultException`1

     <Message>System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #06912640</Message>

     <Timestamp>2019-01-17T13:44:17.0812018Z</Timestamp>

     <ExceptionRetriable>false</ExceptionRetriable>

     <ExceptionSource i:nil="true" />

     <InnerFault i:nil="true" />

     <OriginalException i:nil="true" />

     <TraceText i:nil="true" />

    </OrganizationServiceFault>

    Any idea?

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi ,

    Did you try to apply suggestion given in the thread -- "This error usually happens when the field you are trying to edit is added as a "Find Column" in the Quick Find View of the entity ".

    alternatively - is there an option of deleting this field and re-creating it? if its new.

  • Community Member Profile Picture
    on at

    Yeah these fields are not added to any views as of now. Yeah, I can try to delete them. Did you mean recreating it and before I hit save, increase the value?

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans