Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Hide Field in BPF javascript

  • 1.  Hide Field in BPF javascript

    SILVER CONTRIBUTOR
    Posted 19 days ago
    Hello,

    I'm trying to hide a field in the business process flow using Xrm.Page.getControl('header_process_sm_followupactivitytime').setVisible(false), but it errors out. I've tried a few different variations like adding double quotes around the field but that didn't work. It works if I remove 'header_process_' and it hides the field on the form with no issues, but I can't get it to hide in the business process flow. Please help.

    ------------------------------
    Tristan Holt
    CRM Administrator
    StoneMor Partners
    Trevose PA
    ------------------------------
    CRMUG Summit - Post


  • 2.  RE: Hide Field in BPF javascript

    Posted 18 days ago
    Hi Tristan,
    I do something similar in my environment (V 9.1). The below is an example which works in both web and UCI..

    Xrm.Page.getControl("header_process_purchaseprocess").setVisible(false);

    If you run the below in the console what happens?
    Xrm.Page.getControl("header_process_sm_followupactivitytime");

    Do you receive an object?

    ------------------------------
    Ty
    ------------------------------

    CRMUG Summit - Post


  • 3.  RE: Hide Field in BPF javascript

    SILVER CONTRIBUTOR
    Posted 18 days ago
    Hi Ty,

    I can get to the console, but I don't know what I'm looking at to tell you Yay or Nay.

    ------------------------------
    Tristan Holt
    CRM Administrator
    StoneMor Partners
    Trevose PA
    ------------------------------

    CRMUG Summit - Post


  • 4.  RE: Hide Field in BPF javascript

    SILVER CONTRIBUTOR
    Posted 18 days ago
    When I remove the .setVisible from ('header_process_firstname'); I don't get any errors.

    ------------------------------
    Tristan Holt
    CRM Administrator
    StoneMor Partners
    Trevose PA
    ------------------------------

    CRMUG Summit - Post


  • 5.  RE: Hide Field in BPF javascript

    TOP CONTRIBUTOR
    Posted 17 days ago
    Tristan

    That means "header_process_firstname" doesn't exist. You will get an error when you try to execute a method to an undefined object.

    ------------------------------
    Rex Kenley Tan, MCSA: Web Applications
    Tallmadge OH
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------

    CRMUG Summit - Post


If you've found this thread useful, dive deeper into User Group community content by role