Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Page reload which can display proper webresource upon form Save.

$
0
0

Hi,

I am fairly new to CRM and quite not sure if I am doing right.

I have a page with a 2 webresources ( some third party subgrids) which holds the child records. These child records are created upon the form save.

My requirement is to display only one of the subgrids depending on a particular field value upon save.

I have the below function which is triggered onload() which works fine. However the same function does not work onSave(). ie lets say when i open the form which is not the first time created one it works fine. However if i am creating the parent record first time this does not work. Instead it displays empty section.

Please note: The webresource I am using is some thirdparty control that does not support any javascripts so that is why I have placed them in a section.

My code is below:

function DisplayCorrectgrid(executionObj)

{

if(myfieldvalue = "abc")

xrm.page.ui.tabs.get("subgrid_tab").section.get("abcsection").setVisible(true);

xrm.page.ui.tabs.get("subgrid_tab").section.get("xyzsection").setVisible(false);

}

else

{

xrm.page.ui.tabs.get("subgrid_tab").section.get("abcsection").setVisible(false);

xrm.page.ui.tabs.get("subgrid_tab").section.get("xyzsection").setVisible(true);

}

I feel I am doing something wrong in here but quite not sure of how to get this done. Any kind of advice is helpful. Thanks in Advance.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>