EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB221840: How to Remove Send Drop Down Options for Send Now Subscription Using MicroStrategy Web SDK


Community Admin

• Strategy


Before Customization:

ka04W00000148LJQAY_0EM440000002GQD.jpeg

 
After Customization:

ka04W00000148LJQAY_0EM440000002GQ1.jpeg

 
Using the Web Customization Editor to create a plug-in
Strategy SDK provides a Web Customization Editor that can be used to create a customization plug-in. The following steps show how to create the plug-in and deploy.

  1. Launch the Web Customization Editor.
  2. Create a new plugin.
  3. Click in Strategy Web Configuration inside the Application Settings view to expand the hierarchical tree. The expanded list comprises the different settings that can be modified to perform customizations.
  4. Right-mouse click Styles and select Create Transform to launch the Transform Creation Wizard.
  5. Click .. next to the Source folder text field to select the src folder (under the Strategy Project) and click OK.
  6. Enter the following information for the rest of the text fields:

Package: ##Any package the client wants to use##
Name: Custom_SubscriptionSendNowTransform
Transform description: This transform will remove options from the Send dropdown.
Superclass: com.Strategy.web.app.transforms.SubscriptionSendNowTransform

  • Click Next.
  • Click the check box button for renderSchedulePane (MarkupOutput arg0) and click Next.

ka04W00000148LJQAY_0EM440000002GQ2.jpeg
  • Click Finish. Custom_SubscriptionSendNowTransform.java opens in the editor.
  • Add the following code to the renderSchedulePane method:
    
    // Creating a Markupout object
    MarkupOutput newOutput = WebBeanFactory.getInstance().newMarkupOutput();
        
         /** Rendering the out of the box markup for this Schedule Pane
         * as the remaining code will be editing the MarkupOutput object
         * and not recreating the object. The markup will be placed in a
         * method Markup object so the user will not see the original Schedule Pane
         */
         super.renderSchedulePane(newOutput);
    
         /** The following code was meant for version 9.3.1
         * If for future versions, this code no longer works, uncomment the line below,
         * this will output the Markupoutput to the console to see what "options" are created
         * for the "Send:" drop down values. Copy and paste the new option valudes in string replace
         * statements below.
         */
    
         //System.out.println("Original Output = " + newOutput.getCopyAsString());
    
         // Creating a String version of the markup in order to manipulate the object
         String newOutputString = newOutput.getCopyAsString();
    
         // Removing the Data in Email option
         newOutputString = newOutputString.replace("<option value=\"0,0,1\">Data in email</option>", "");
    
         // Removing the Data in email and to history list
         newOutputString = newOutputString.replace("<option value=\"0,1,1\">Data in email and to history list</option>", "");
    
         // Removing the Data and link to history list in email
         newOutputString = newOutputString.replace("<option value=\"1,1,1\">Data and link to history list in email</option>", "");
    
         // Rendering the new MarkupOutput object to be displayed to the end user
    
         arg0.append(newOutputString);
         return ;

 

  1. Save the changes.
  2. Navigate to Strategy Web Configuration > Styles
  3. Double click on SendNowSubscriptionStyle.
  4. Click the "Change" button for Transform: SubscriptionSendNowTransform. Change it to the new transform created in Step 6 (Custom_SubscriptionSendNowTransform).
  5. Save the changes.
  6. Restart the Web Server to apply the changes.

The example provided in this document is provided “as-is” to the user and assumes that the user:

  • Can program, compile (e.g. javac, jikes, etc.), and execute Java programs
  • Can configure environment variables (e.g. JAR files, property files, etc.)
  • Have all the necessary tools to create Java applications (JDK, IDE, etc.)
  • Has access to the Strategy SDK documentation.
  • Has read the customization warning at the bottom of this document

PREREQUISITES:
For the sample to work, the Strategy Web JAR files must be accessible by the Java Runtime
Environment. The Strategy Web JAR files can be found under:

  • Strategy Web Universal (JSP): {web_root}/WEB-INF/lib directory.
  • Strategy Web (.NET): Program Files\Common Files\Strategy directory.

Note:
More elaborate programs will require additional library files and are out of the scope of this document.
 
ADDITIONAL INFORMATION:
The Strategy SDK allows you to customize the standard Strategy Web interface, and extend and integrate the Strategy business intelligence functionality into other applications. However, before changing the way Strategy Web products look or behave, it is helpful to understand how the application is built. For more information regarding the Strategy Web architecture or the process of customizing Strategy Web, please refer to Strategy Developer Zone (https://community.strategy.com/topic/0TO44000000FliLGAS/sdk).
 
To access the Strategy Developer Zone, you must have access to the Strategy Knowledge Base, you must have purchased the Strategy SDK, and you must be current on your Strategy maintenance agreement. If you are a US-based business and believe that you satisfy all three of these conditions but you do not have access to the Strategy Developer Zone, please contact Strategy Technical Support at support@microstrategy.com or at (703) 848-8700. If you are an international business, please contact Strategy Technical Support at the appropriate email address or phone number found at https://www.microstrategy.com/en/support/contact-support.
 
CUSTOMIZATION WARNING:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.
 
RELATED ARTICLES: 
KB221863: How to Remove Send Drop Down Options When Sending an E-mail Subscription after Report Execution using MicroStrategy Web SDK 9.4.1
KB227097: How to Remove an Option From the "Send" Drop Down List for an E-mail Alert Subscription Using MicroStrategy Web SDK 9.4.1


Comment

0 comments

Details

Knowledge Article

Published:

June 22, 2017

Last Updated:

April 21, 2021