Modify headerTemplate comment in AX2012
Views (569)
Hi,
If we want to modify the comment provided by headerTemplate (Path :Rt Click > Scripts > Documentation > HeaderTemplate) to any class/table method then we need to modify method documentation_HeaderTemplate of class EditorScripts.
In this example, I tried to add information to the remarks node like current user company, default project name, current user who developed/modified the code and time stamp when the change is made. User company and Project name are taken from User Options form(on Development tab page).
Path: \Classes\EditorScripts\documentation_HeaderTemplate.
//
// Insert remarks
//
//text += '/// <remarks>\n/// \n/// </remarks>\n'; // Comment default content
select Name from userInfo
where userInfo.Id == curUserId();
codeRemarks = strFmt(' Created as part of project: %1 \n', userInfo.StartupProject);
codeRemarks += strFmt('/// By %1 - %3 - %2', userInfo.Name, DateTimeUtil::getSystemDateTime(), userInfo.networkDomain);
text += strFmt('/// <remarks>\n/// %1 \n/// </remarks>\n', codeRemarks);
Output:

Like
Report
*This post is locked for comments