Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 123975

Forum Post: RE: open a case form through js, with closed activities selected?

$
0
0

You could do something like this:

On the Case form - under form properties - add a new form parameter - call it "parameter_leftnave"

Add a script similar to this on the Case form OnLoad - note you seem to need the timeout other wise the navigation doesn't appear to work.

function Case_OnLoad() {     if (Xrm.Page.ui.getFormType() == 2) {         var index = Xrm.Page.context.getQueryStringParameters().parameter_leftnav;         if (index === null || index === undefined) return;         setTimeout(function () {             Xrm.Page.ui.navigation.items.get(parseInt(index)).setFocus();         }, 500);     } } 

Then you can open the Case form using something like this:

var parameters = {}; parameters["parameter_leftnav"] = "1"; Xrm.Utility.openEntityForm("incident", "4B5E1B86-8EF8-E211-864B-B4B52F567D08", parameters); 

This will open the existing Case and navigate to the numeric index of the left navigation item you want to display.

I didn't test this to any great extent but it should get you started. 


Viewing all articles
Browse latest Browse all 123975

Trending Articles



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