AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 02.12.2017, 00:11   #1  
Blog bot is offline
Blog bot
Участник
 
19,729 / 666 (62) +++++++
Регистрация: 28.10.2006
stoneridgesoftware: How to X++ Code Search Using Dynamics AX Model Database
Источник: https://stoneridgesoftware.com/how-t...odel-database/
==============

If you started your development career in Visual Studio and then had to switch to MorphX IDE, one of the features you probably miss is ‘Find in Entire Solution’.

In Visual Studio, the ‘Find’ functionality is very robust – allowing us to search and/or replace in the entire Visual Studio Solution via keywords, matching case, matching whole word and even allowing us to use regular expressions.



In MorphX IDE, the ‘Find’ functionality is ‘decent’ and works best if you are searching within an object, like a Class or Table, but if you want to find something across all objects – meaning the entire AOT, it’s probably going to take a long time to search. I lost my patience after waiting for couple hours for the search below to finish…



‘What If’ you could query the Dynamics AX Model Database to find a string across all objects? Well, using the simple SQL Query below, you can:

SELECT RootHandle.Name RootElementName, ElementHandle.Name ElementName, ElementTypes.ElementTypeName Type, CAST(Sources.SourceText AS nvarchar(MAX)) SourceTextFROM Sources Sources JOIN ModelElement ElementHandle ON Sources.SourceHandle = ElementHandle.ElementHandle JOIN ModelElement RootHandle ON RootHandle.ElementHandle = ElementHandle.RootHandle JOIN ElementTypes ElementTypes ON ElementTypes.ElementType = ElementHandle.ElementTypeWHERE CAST(Sources.SourceText AS nvarchar(MAX)) LIKE '%FDD-003%'

The query results took ~26 seconds to find the 7 objects where ‘FDD-003’ is mentioned.




The ‘Where’ clause in the query above can be modified to better fit the text comparison you are looking for, using one of the following SQL operators: =, , >, >=,
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 02.12.2017, 23:10   #2  
ax_mct is offline
ax_mct
Участник
Аватар для ax_mct
 
1,741 / 573 (23) +++++++
Регистрация: 10.10.2005
Адрес: PHP
Цитата:
Ramesh Singh is an Architect at Stoneridge Software specializing in integrations. Prior to Stoneridge, Ramesh worked in core development team at Microsoft for Dynamics AX. He was one of the team members responsible for re-architecting the financial dimension framework for Dynamics 365 for Operations (AX7). Ramesh has worked on several integration projects for Stoneridge Software, spanning across multiple domains including but not limited to Retail POS system integration, E-commerce integration, Product configurator manager integration and Field service management integration.
Цитата:
I lost my patience after waiting for couple hours for the search below to finish…
..
‘What If’ you could query the Dynamics AX Model Database to find a string across all objects? Well, using the simple SQL Query below, you can:
...
Что ж, вполне себе диагноз.
А у меня занимает 9 секунд найти 1306 "Box::".
За это сообщение автора поблагодарили: Logger (1).
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
stoneridgesoftware: How to Integrate Power BI with Dynamics 365 for Financials Blog bot DAX Blogs 0 01.04.2017 02:17
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 15 Blog bot Dynamics CRM: Blogs 1 10.02.2016 10:26
patrickmouwen: Dynamics AX Retail 3rd party POS and E-commerce integration – Solution Design Blog bot DAX Blogs 0 26.10.2015 12:11
dynamics-ax: Interview with Microsoft's Lachlan Cash on his new role, AX 2012 and more Blog bot DAX Blogs 6 22.04.2011 14:55
Platform updates overview - 3.70.B - NAV2009 R2 Blog bot Dynamics CRM: Blogs 0 07.02.2011 22:06
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 18:00.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.