Example of adding a ToolbarButton to an Entity in ISV.conf?

Miklos_Hollender
Member Posts: 1,598
If you have one please paste it here - the complete XML file, not just the snippet.
Whenever I export the ISV.config, remove the examples in the CDATA, add the configuration, root and ISVconfig elements and the toolbar to the entity, it complains about a schema validation in the configuration version = 3.00530.00 line (or something like that, the standard number)
Whenever I export the ISV.config, remove the examples in the CDATA, add the configuration, root and ISVconfig elements and the toolbar to the entity, it complains about a schema validation in the configuration version = 3.00530.00 line (or something like that, the standard number)
0
Comments
-
Hi Miklos,
isv.config from crm sdk 3.0 :
<configuration version="3.0.0000.0">
<Root>
<!-- Global Menu Bar at the top of all root level areas -->
<MenuBar>
<!-- Custom Menus - between the Goto Menu and the Help Menu -->
<CustomMenus>
<Menu Title="ISV">
<MenuItem Title="New Window" Url="http://www.microsoft.com" />
<MenuSpacer />
<!-- A horizontal drop down menu spacer -->
<SubMenu Title="ISV Tests">
<MenuItem Title="Modeless Dialog"
Url="http://www.microsoft.com" WinMode="2" />
<MenuSpacer />
<MenuItem Title="Modal Dialog"
Url="http://www.microsoft.com" WinMode="1" />
<MenuSpacer />
<MenuItem Title="Custom JavaScript"
JavaScript="alert('test');" />
</SubMenu>
</Menu>
</CustomMenus>
</MenuBar>
<!--
Application Level Tool Bar
-->
<ToolBar>
<Button Title="Test" ToolTip="Info on Test"
Icon="/_imgs/ico_18_debug.gif"
JavaScript="alert('test');" />
<ToolBarSpacer />
<!-- A vertical toolbar spacer -->
<Button Title="Web Only"
ToolTip="Web client only"
Icon="/_imgs/ico_18_debug.gif"
JavaScript="alert('test');" Client="Web" />
<Button Title="Outlook Only"
ToolTip="Outlook only: Also available offline"
Icon="/_imgs/ico_18_debug.gif"
JavaScript="alert('test');"
Client="Outlook" AvailableOffline="true" />
<Button Title="Both"
ToolTip="Both Clients: Both Web and Outlook Clients"
Icon="/_imgs/ico_18_debug.gif"
JavaScript="alert('test');"
Client="Web, Outlook"
AvailableOffline="true" />
</ToolBar>
</Root>
<!-- Microsoft Customer Relationship Management Entities (Objects) -->
<Entities>
<Entity name="account">
<MenuBar>
<!-- Custom Menus that you may add -->
<CustomMenus>
<Menu Title="ISV">
<MenuItem Title="Coming Soon..."
Url="http://www.microsoft.com"
PassParams="0" WinMode="1" />
<MenuSpacer />
<SubMenu Title="Sub Test">
<MenuItem Title="Test Sub 1"
Url="http://www.microsoft.com" PassParams="1" />
<MenuSpacer />
<MenuItem Title="Test Sub 2" />
</SubMenu>
<MenuSpacer />
<MenuItem Title="Coming Soon..."
Url="http://www.microsoft.com" PassParams="0" />
<MenuItem Title="Web Only" Client="Web" />
<MenuItem Title="Outlook Only" Client="Outlook"
AvailableOffline="true" />
<MenuSpacer />
<MenuItem Title="Valid For Update Only" ValidForUpdate="0" />
<MenuItem Title="Valid For Create Only" ValidForCreate="1" />
</Menu>
</CustomMenus>
</MenuBar>
<!-- The Account Tool Bar -->
<ToolBar ValidForCreate="0" ValidForUpdate="1">
<Button Title="asdf" ToolTip="Info on Test"
Icon="/_imgs/ico_18_debug.gif"
Url="http://www.microsoft.com"
PassParams="1" WinParams="" WinMode="0" />
<ToolBarSpacer />
<Button Title="Test" ToolTip="Info on Test"
Icon="/_imgs/ico_18_debug.gif"
Url="http://www.microsoft.com"
PassParams="1" WinParams="" WinMode="1" />
<Button Title="Web Only"
ToolTip="Web client only"
Icon="/_imgs/ico_18_debug.gif"
JavaScript="alert('test');"
Client="Web" />
<Button Title="Outlook Only"
ToolTip="Outlook only: Also available offline"
Icon="/_imgs/ico_18_debug.gif"
JavaScript="alert('test');"
Client="Outlook" AvailableOffline="true" />
</ToolBar>
<!-- The Account Left Nav Bar -->
<NavBar ValidForCreate="0" ValidForUpdate="1">
<!--
Valid Areas Include
===================
Sales
Marketing
Service
Info
-->
<NavBarItem Icon="/_imgs/ico_18_debug.gif"
Title="ISV Default"
Url="http://www.microsoft.com" Id="navItem" />
<NavBarItem Icon="/_imgs/ico_18_debug.gif"
Title="ISV Web Only"
Url="http://www.microsoft.com"
Id="navItemWeb" Client="Web" />
<NavBarItem Icon="/_imgs/ico_18_debug.gif"
Title="ISV Outlook Only"
Url="http://www.microsoft.com"
Id="navItemOutlook" Client="Outlook"
AvailableOffline="true" />
<NavBarItem Icon="/_imgs/ico_18_debug.gif"
Title="ISV Sales"
Url="http://www.microsoft.com"
Id="navSalesItem" Area="Sales" />
<NavBarItem Icon="/_imgs/ico_18_debug.gif"
Title="ISV Info"
Url="http://www.microsoft.com"
Id="navInfoItem" Area="Info" />
<NavBarItem Icon="/_imgs/ico_18_debug.gif"
Title="ISV Marketing"
Url="http://www.microsoft.com"
Id="navMarketingItem" Area="Marketing" />
<NavBarItem Icon="/_imgs/ico_18_debug.gif"
Title="ISV Service"
Url="http://www.microsoft.com"
Id="navServiceItem" Area="Service" />
</NavBar>
<Grid>
<MenuBar>
<ActionsMenu>
<MenuItem Title="Coming Soon..."
Url="http://www.microsoft.com" WinMode="1" />
<MenuSpacer />
<SubMenu Title="Sub Test">
<MenuItem Title="Test Sub 1"
Url="http://www.microsoft.com" />
<MenuSpacer />
<MenuItem Title="Test Sub 2" />
<MenuItem Title="Web Only" Client="Web" />
<MenuItem Title="Outlook Only"
Client="Outlook" AvailableOffline="true" />
</SubMenu>
<MenuItem Title="Web Only" Client="Web" />
<MenuItem Title="Outlook Only"
Client="Outlook" AvailableOffline="true" />
</ActionsMenu>
<Buttons>
<Button Title="Test" ToolTip="Info on Test"
Icon="/_imgs/ico_18_debug.gif"
Url="http://www.microsoft.com"
WinParams="" WinMode="2" />
<ToolBarSpacer />
<Button Title="Test" ToolTip="Info on Test"
Icon="/_imgs/ico_18_debug.gif"
Url="http://www.microsoft.com"
WinParams="" WinMode="1" />
<Button Title="Web Only"
ToolTip="Web client only"
Icon="/_imgs/ico_18_debug.gif"
JavaScript="alert('test');" Client="Web" />
<Button Title="Outlook Only"
ToolTip="Outlook only: Also available offline"
Icon="/_imgs/ico_18_debug.gif"
JavaScript="alert('test');" Client="Outlook"
AvailableOffline="true" />
</Buttons>
</MenuBar>
</Grid>
</Entity>
<Entity name="contact" />
<Entity name="lead" />
<Entity name="opportunity" />
<Entity name="list" />
<Entity name="campaign" />
<Entity name="campaignactivity" />
<Entity name="campaignresponse" />
<Entity name="incident" />
<!-- Case -->
<Entity name="quote" />
<Entity name="salesorder" />
<!-- Order -->
<Entity name="invoice" />
<!-- Custom Entities -->
<!-- <Entity name="myEntity"/> -->
<!-- End Custom Entities -->
</Entities>
<!-- Microsoft Customer Relationship Management Service Management Customization -->
<ServiceManagement>
<AppointmentBook>
<SmoothScrollLimit>2000</SmoothScrollLimit>
<TimeBlocks>
<!-- All CSS Class mapping for Service actiivties -->
<TimeBlock EntityType="4214" StatusCode="1"
CssClass="ganttBlockServiceActivityStatus1" />
<TimeBlock EntityType="4214" StatusCode="2"
CssClass="ganttBlockServiceActivityStatus2" />
<TimeBlock EntityType="4214" StatusCode="3"
CssClass="ganttBlockServiceActivityStatus3" />
<TimeBlock EntityType="4214" StatusCode="4"
CssClass="ganttBlockServiceActivityStatus4" />
<TimeBlock EntityType="4214" StatusCode="6"
CssClass="ganttBlockServiceActivityStatus6" />
<TimeBlock EntityType="4214" StatusCode="7"
CssClass="ganttBlockServiceActivityStatus7" />
<TimeBlock EntityType="4214" StatusCode="8"
CssClass="ganttBlockServiceActivityStatus8" />
<TimeBlock EntityType="4214" StatusCode="9"
CssClass="ganttBlockServiceActivityStatus9" />
<TimeBlock EntityType="4214" StatusCode="10"
CssClass="ganttBlockServiceActivityStatus10" />
<!-- All CSS Class mapping for Appointments -->
<TimeBlock EntityType="4201" StatusCode="1"
CssClass="ganttBlockAppointmentStatus1" />
<TimeBlock EntityType="4201" StatusCode="2"
CssClass="ganttBlockAppointmentStatus2" />
<TimeBlock EntityType="4201" StatusCode="3"
CssClass="ganttBlockAppointmentStatus3" />
<TimeBlock EntityType="4201" StatusCode="4"
CssClass="ganttBlockAppointmentStatus4" />
<TimeBlock EntityType="4201" StatusCode="5"
CssClass="ganttBlockAppointmentStatus5" />
<TimeBlock EntityType="4201" StatusCode="6"
CssClass="ganttBlockAppointmentStatus6" />
</TimeBlocks>
</AppointmentBook>
</ServiceManagement>
</configuration>
Hope it helps.Brg,
--
János Borsics0 -
Sorry but it doesn't. This is how I started it - removing unnecessary from this one and keeping the button only. Didn't work, always failing on the Configuration line. I guess the main problem is I have no idea what XML entities are mandatory f.e. do I have to keep the Root if it's empty.
I think I'll just switch to hacker mode and replace the outerHTM of the previous button from JScript.0 -
hacked in JavaScript:
function add_toolbar_button(name, id, image, event) { var toolbar = document.all.mnuBar2.rows(0).cells(0); var html = "" + "<SPAN tabindex='0' class='menu' style='padding:3px 3px 0px 3px' pl='3' pr='3' title='" + name + "' onclick='" + event + "' id='" + id + "'>" + "<DIV class='mnuBtn'>" + "<IMG src='" + image + "' class='mnuBtn'>" + name + "</DIV></SPAN>"; toolbar.insertAdjacentHTML("beforeEnd", html); }; function send_mail_button_onclick() { location='mailto:?SUBJECT=' + crmForm.all.title.DataValue + ' - '+ crmForm.all.customerid.DataValue[0].name + '&BODY='+location.href; }; function case_add_linkbtn() { if (crmForm.FormType==2) //update { add_toolbar_button("Create Link in E-Mail","CreateLinkInEmail","/_imgs/ico_16_138.gif","send_mail_button_onclick()"); }; };
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions