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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 25.02.2011, 16:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Documentation "How to: Add a URL Drill Through Action" confusing
Источник: http://blogs.msdn.com/b/emeadaxsuppo...confusing.aspx
==============

Recently we found an "Invalid Range" error to logged when using drill through on an AX SRS Report we created for a custom table following the documentation at the link below:

"How to: Add a URL Drill Through Action" http://msdn.microsoft.com/en-US/library/cc582049.aspx

From further investigation we found the the hardcoded 1 at indexFields.Add method from the code below to be the cause. The number is not referencing the order of the fields in the unique (composit) index but is a reference to the fieldnumber of the field in the table. For CustTable accountNumber used in the sample code this appear to be 1. For fields in custom tables this is rarely the case

Just to clear up the confusion.

X++:
[DataMethod(), AxSessionPermission(SecurityAction.Assert)]
public static string AccountNumberUrl(string context, string accountNumber)
{
    Dictionary indexFields = new Dictionary();
    indexFields.Add(1, accountNumber);
    int tableId = 77;     // Check whether the context is the client. If so, generate a
    // URL to display the CustTable form.
    if (RuntimeReportContext.IsClientContext(context))
    {
        return DynaLink.GenerateURL(context, "CustTable", MenuItemType.Display, tableId, indexFields);
    }

     // Check whether the context is EP. If so, generate a URL to
    // display the EPCustTableInfo Web menu item.
    else if (RuntimeReportContext.IsEPContext(context))
    {
        return DynaLink.GenerateURL(context, "EPCustTableInfo", MenuItemType.WebMenuItemTypeUrl, tableId, indexFields);
    }
    return string.Empty;
}



--author: Jago van der Most --editor: Jago van der Most --date: 25/Feb/2011


Источник: http://blogs.msdn.com/b/emeadaxsuppo...confusing.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: How to add financial dimension to Dynamics AX Default cubes Blog bot DAX Blogs 0 13.01.2011 16:11
emeadaxsupport: How to troubleshoot Enterprise Portal error ”Unable to render content due to an error. Please contact your system administrator." Blog bot DAX Blogs 0 17.11.2010 18:11
emeadaxsupport: How can the Web Proxies get extended programmatically? Blog bot DAX Blogs 0 16.12.2009 18:05
Kashperuk Ivan: Running a class from AOT or "How to assign a class to an action menu item?" Blog bot DAX Blogs 0 22.10.2009 20:05
emeadaxsupport: How to fix SQL error: "Too many parameters were provided in this RPC request" Blog bot DAX Blogs 0 01.09.2009 15:05

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

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

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