Показать сообщение отдельно
Старый 09.09.2014, 23:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
tlefor: AX2012: Reading a string from an AOT resource
Источник: http://blogs.msdn.com/b/tlefor/archi...-resource.aspx
==============

Sometimes the most basic of concepts become a challenge unless you've seen an example or have any idea that they exist at all. Within Dynamics AX, the use of resources to persist images, blobs or strings is one of those concepts. This is a quick example of how to obtain modeled data that has been persisted as an AOT resource within AX2012.

X++:
 static str getResourceString(SysElementName _resName)
{
    resourceNode resourceNode = SysResource::getResourceNode(_resName);
    container stringContainier;

     if (!resourceNode)
    {
        return '';
    }

     resourceNode.AOTload();

     stringContainier= SysResource::getResourceNodeData(resourceNode);
    return conPeek(stringContainier, 1);
}
The string can contain default data, XML, HTML or whatever else your application needs.




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

Последний раз редактировалось mazzy; 10.09.2014 в 08:49.