locked
potential customer control crm 2011 RRS feed

  • Question

  • hi i want to check potential customer type( is it account or contact ) when  load opportunity opportunity

    how can i perform this task?


    Crm Software Specialist

    Friday, September 14, 2012 12:54 PM

Answers

  • Try this:

    function OnLoad() {
        var lookup = Xrm.Page.getAttribute("customerid");
        if (lookup != null) {
            var lookupVal = lookup.getValue();
            if ((lookupVal != null)) {
                var type = lookupVal[0].entityType;
            }
        }
    }


    Jason Lattimer

    Friday, September 14, 2012 1:08 PM
    Moderator

All replies

  • Try this:

    function OnLoad() {
        var lookup = Xrm.Page.getAttribute("customerid");
        if (lookup != null) {
            var lookupVal = lookup.getValue();
            if ((lookupVal != null)) {
                var type = lookupVal[0].entityType;
            }
        }
    }


    Jason Lattimer

    Friday, September 14, 2012 1:08 PM
    Moderator
  • Try this:

    function OnLoad() {
        var lookup = Xrm.Page.getAttribute("customerid");
        if (lookup != null) {
            var lookupVal = lookup.getValue();
            if ((lookupVal != null)) {
                var type = lookupVal[0].entityType;
            }
        }
    }


    Jason Lattimer


    thx it works

    Crm Software Specialist

    Friday, September 14, 2012 2:22 PM