locked
Disable ribbon buttons based on status of campaign RRS feed

  • Question

  • Iam using the below code to disable launch ribbon button when i change the status details of campaign to "launched"...It is working .. parallely.... i need to do the same with cancel ribbon button .. That means i want the 2 actions to perform using the below code by adding function to this.. Can u help me with this..

    ------------------

    function onload()
    {

    var buttonID="campaign|NoRelationship|Form|new.campaign.Button1.Button";

    var btn = window.top.document.getElementById(buttonID);

    if (Xrm.Page.data.entity.attributes.get("statuscode").getValue() ==2 ) //Here 2 represents the value for launched state of campaign

             {  btn.style.display = "none";  }

    Monday, February 3, 2014 6:51 AM