T
Thiru
I am trying to Switch views depends on the selection in the dropdown list
box...After this event, its picking up the value correctly but not switching
views.
The error message i get is "Invalid Context for OM Call"
I have copied the code below for your comments and advise....
function msoxd_my_Sub_Category_MFab::OnAfterChange(eventObj)
{
// Write code here to restore the global state.
if (eventObj.IsUndoRedo)
{
// An undo or redo operation has occurred and the DOM is read-only.
return;
}
// A field change has occurred and the DOM is writable. Write code here to
respond to the changes.
var optionvalue = eventObj.Site.text;
//XDocument.UI.Alert(optionvalue);
if (optionvalue == 1)
{
XDocument.View.SwitchView("Major_Fabrication");
}
if (optionvalue ==2)
{
XDocument.View.SwitchView("Rigging");
}
}
box...After this event, its picking up the value correctly but not switching
views.
The error message i get is "Invalid Context for OM Call"
I have copied the code below for your comments and advise....
function msoxd_my_Sub_Category_MFab::OnAfterChange(eventObj)
{
// Write code here to restore the global state.
if (eventObj.IsUndoRedo)
{
// An undo or redo operation has occurred and the DOM is read-only.
return;
}
// A field change has occurred and the DOM is writable. Write code here to
respond to the changes.
var optionvalue = eventObj.Site.text;
//XDocument.UI.Alert(optionvalue);
if (optionvalue == 1)
{
XDocument.View.SwitchView("Major_Fabrication");
}
if (optionvalue ==2)
{
XDocument.View.SwitchView("Rigging");
}
}