- จะได้ User ใส่ ไฟล์ Text แล้วนำไปใส่ Office หรือไปใช้งานต่อ
- static void ExportUerFromGroup(Args _args)
- {
- UserGroupList groups;
- UserInfo userInfo;
- AsciiIO myFile;
- str strEmpId;
- ;
- myFile=new AsciiIO("D:\\Full.txt","a");
- WHILE
- SELECT * FROM groups
- ORDER BY groupId
- WHERE groups.groupId == 'LG-E1'
- || groups.groupId == 'LG-M'
- || groups.groupId == 'LG-S1'
- || groups.groupId == 'SS-E1'
- || groups.groupId == 'SS-E2'
- || groups.groupId == 'SS-M'
- || groups.groupId == 'SS-S1'
- || groups.groupId == 'SS-S2'
- || groups.groupId == 'IF-E1'
- || groups.groupId == 'IF-E2'
- || groups.groupId == 'IF-M'
- || groups.groupId == 'IF-S1'
- || groups.groupId == 'IF-S2'
- //Mask View.
- /*WHERE groups.groupId == 'DS-E1'
- || groups.groupId == 'DS-E2'
- || groups.groupId == 'IF-N03'
- || groups.groupId == 'PD-E1'
- || groups.groupId == 'PD-E2'
- || groups.groupId == 'PD-N03'
- || groups.groupId == 'QA-E1'
- || groups.groupId == 'S2-E'
- || groups.groupId == 'V_ALL'*/
- {
- //print groups.groupId;
- WHILE
- SELECT * FROM userInfo
- WHERE userInfo.id == groups.userId
- {
- //info(strfmt("%1:%2", userInfo.id, userInfo.name));
- myFile.write(strfmt("%1,%2,%3",userInfo.id, userInfo.name, enum2str(userInfo.enable)));
- //strEmpId = strfmt("%1,%2", strEmpId, userInfo.id);
- }
- }
- //myFile.write(strEmpId);
- myFile = null;
- }
Example : https://community.dynamics.com/ax/f/33/t/144374
No comments:
Post a Comment