Показать сообщение отдельно
Старый 27.11.2018, 21:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
d365technext: WBS key for a project activity X++ code
Источник: http://d365technext.blogspot.com/201...ty-x-code.html
==============



WBS key for a project activity X++ code



Using following SQL Query you can retrieve all activities of one project.

select PURPOSE,ACTIVITYNUMBER from smmActivities
where ACTIVITYNUMBER in (
select ActivityNumber from SmmActivityParentLinkTable
join projTable
on projTable.Recid=SmmActivityParentLinkTable.refRecId
and SmmActivityParentLinkTable.parentType=7


where projTable.ProjId='PROJ-0000003')



Using following AX Query you can retrieve all activities of one project.

SmmActivityParentLinkTable activityParentLinkTable;
ProjTable projTable;
ProjectActivityNumber projectActivityNumber;
smmActivities smmActivities;




while select PURPOSE,ACTIVITYNUMBER from smmActivities
exists join activityParentLinkTable
where activityParentLinkTable.ActivityNumber==smmActivities.ActivityNumber
exists join projTable
where projTable.Recid==activityParentLinkTable.refRecId
&& activityParentLinkTable.parentType==smmActivityParentType::Project
&& projTable.ProjId=="PROJ-0000003"
{
// projectActivityNumber=new ProjectActivityNumber();

// projectActivityNumber.ActivityNumber=activityParentLinkTable.ActivityNumber;
info(strFmt("%1 %2",smmActivities.Purpose, smmActivities.ActivityNumber));
// _objContract.addProjectActivity(projectActivityNumber);
}

Источник: http://d365technext.blogspot.com/201...ty-x-code.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.