locked
How to retrieve the GUID of an incident entity with Javascript / CRM 2013 RRS feed

  • Question

  • Hello All,

    I have a big headache with incident entity today.

    I want to modify the subgrid source of a custom entity linked to Incident entity.

    The idea was to use this instruction to get the GUID of the parent incident ( i will use a fetch xml after):    

    lookupfield = Xrm.Page.getAttribute('incidentid').getValue();

    alert(lookupfield[0].id); // display test

    I got this value 'Undefined'

    Reason is simple, I haven't any field incidentidin my form. Problem is : there isn't any field available  with the name "Incident ID" into the form editor whereas in field list of the entity, this field exists!

    Any idea please to get this GUID ?

    Thank you

    Thomas


    Thomas Larcher / HAYWARD POOL EUROPE

    Monday, April 28, 2014 3:52 PM

Answers

  • Try:

    entityId = Xrm.Page.data.entity.getId();
    alert(entityId);
    


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, April 28, 2014 8:46 PM
    Moderator

All replies

  • Try:

    entityId = Xrm.Page.data.entity.getId();
    alert(entityId);
    


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, April 28, 2014 8:46 PM
    Moderator
  • Working perfect !

    thanks !


    Thomas Larcher / HAYWARD POOL EUROPE

    Tuesday, April 29, 2014 8:59 AM