Add to New Menu: Difference between revisions

From MobileX for SageCRM
(Created page with "The menu is the in object ddNew "ddNew" is a cTSDropDown object. and you call "addItem" on that to add it. addItem = function (ItemName, Caption) In a plugin you wo...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
The menu is the in object
The menu is the in object


   ddNew
   cApp.ddNew


"ddNew" is a cTSDropDown object.  
"ddNew" is a cTSDropDown object.  
Line 14: Line 14:


   var onDocumentReady = function () {
   var onDocumentReady = function () {
     var menuitemx = cApp.ddNew.addItem("menuitemx", "menu title","cApp.doSomething();");
     var menuitemx = cApp.ddNew.addItem("menuitemname", "menu title");
     menuitemx.pr_onclick = "cApp.doSomething();";
     menuitemx.pr_onclick = "cApp.doSomething();";
   }
   }

Latest revision as of 13:42, 18 January 2017

The menu is the in object

 cApp.ddNew

"ddNew" is a cTSDropDown object.

and you call "addItem" on that to add it.

 addItem = function (ItemName, Caption)

In a plugin you would use the "onDocumentReady" method and add in the code.

Example below

 var onDocumentReady = function () {
   var menuitemx = cApp.ddNew.addItem("menuitemname", "menu title");
   menuitemx.pr_onclick = "cApp.doSomething();";
 }