How to create Lookup Worker Filtered by Legal Entity[AX2012]
1. Add a new method in hcmWorker table, and add this script :
public static client void lookupWorkerByLegalEntity
(FormStringControl _lookupctrl, Int64 _LegalEntity)
{
SysTableLookup sysTableLookup;
Query query = new Query();
QueryBuildDataSource queryBuildDataSource, queryBuildDataSource1;
;
SysTableLookup = SysTableLookup::newParameters(tableNum(HcmWorker), _lookupctrl);
sysTableLookup.addLookupfield(fieldNum(HcmWorker, PersonnelNumber));
sysTableLookup.addLookupfield(fieldNum(HcmWorker, Person));
sysTableLookup.addLookupMethod(tableMethodStr(HcmWorker,workerRelationType));
queryBuildDataSource = query.addDataSource(tableNum(HcmWorker)); queryBuildDataSource1 = queryBuildDataSource.addDataSource(tableNum(HcmEmployment));
queryBuildDataSource1.joinMode(JoinMode::ExistsJoin);
queryBuildDataSource1.relations(true);
queryBuildDataSource1.addRange(fieldNum(HcmEmployment, LegalEntity))
.value(SysQuery::value(_LegalEntity)); sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
2. Overide method Lookup in datasource field in form which lookup to worker with this script :
public void lookup(FormControl _formControl, str _filterStr)
{
HcmWorker::lookupWorkerByLegalEntity(_formControl, CompanyInfo::find().RecId);
}
How to create Lookup Worker Filtered by Legal Entity[AX2012]的更多相关文章
- 苹果开发者账号申请时报错提示错误:Legal Entity Name
he information you entered did not match your profile in the D&B database. Before submitting you ...
- Why should I avoid blocking the Event Loop and the Worker Pool?
Don't Block the Event Loop (or the Worker Pool) | Node.js https://nodejs.org/en/docs/guides/dont-blo ...
- Worker Thread
http://www.codeproject.com/Articles/552/Using-Worker-Threads Introduction Worker threads are an eleg ...
- Simple Worker Thread Class
http://www.codeproject.com/Articles/36184/Simple-Worker-Thread-Class Introduction Many times we need ...
- use worker without js file
var blob = new Blob(['onmessage=function(e){postMessage(e.data);}']); debugger; // Obtain a blob URL ...
- [Windows Azure] Building worker role A (email scheduler) for the Windows Azure Email Service application - 4 of 5.
Building worker role A (email scheduler) for the Windows Azure Email Service application - 4 of 5. T ...
- html5 web worker学习笔记(记一)
(吐槽:浏览器js终于进入多线程时代!) 以前利用setTimeout.setInterval等方式的多线程,是伪多线程,本质上是一种在单线程中进行队列执行的方式.自从html5 web worker ...
- [Web Worker] Introduce to Web Worker
What is web worker for? OK, read it docs to get full details idea. Or just a quick intro to web work ...
- ra_interface_lines_all 接口表各字段说明
note:Description and Usage of Fields in RA_INTERFACE_LINES Table [ID 1195997.1] 核心内容: Field Name and ...
随机推荐
- 【转】maven POM.xml 标签详解
http://blog.csdn.net/sunzhenhua0608/article/details/32938533 pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现 ...
- Windows操作 - Photoshop为图片添加透明立体水印
原文地址:http://design.yesky.com/photoshop/252/2427752.shtml 本文我们介绍用Photoshop为图片添加透明立体水印的方法和技巧. 原图: 打开原图 ...
- strtol函数
今天做啦一个进制转换的题,改来改去最终倒是过啦,本来挺开心的,然后去翻啦一下题解,瞬间就有小情绪啦,哎,人家的代码辣么辣么短,实在是不开心,不过谁让咱是小渣渣呢,在此总结一下strtol 函数. 先来 ...
- Iptables 防火墙开放常见的22,53,80端口
用iptables防火墙 iptables -F # 允许包从22端口进入 iptables -A INPUT -p tcp --dport 22 -j ACCEPT # 允许从22端口进入的包返回 ...
- Linux下程序对拍_C++
此博客需要付费才阅读,因为该博客实用性十分强,且十分容易理解 若需购买请联系博主,联系方式戳这 http://www.cnblogs.com/hadilo/p/5932395.html 主要介绍如何在 ...
- Java程序员面试宝典1 ---Java基础部分(该博文为原创,转载请注明出处)
(该博文为原创,转载请注明出处 http://www.cnblogs.com/luyijoy/ by白手伊凡) 1. 基本概念 1) Java为解释性语言,运行过程:程序源 ...
- html中button的type属性
接触web开发不久,今天遇到了一个问题,点击button按钮,浏览器没有反应,尝试了自己可以想到的所有办法,还是无果.只得请教他人,才发现是button的type属性搞得怪,原来: ...
- JAR包
1, 使用JAR文件 jar文件的全称是Java Archive File,意思就是Java档案文件,通常jar文件是一种压缩文件,与常见的ZIP压缩文件兼容,通常也被称为jar包,j ...
- 【EF 5】结合项目实战分析EF三大工作模式之—Database First
导读:所谓的EF的Databasefirst工作模式,是目前我们(不涉及社会领域)用的最广的一种模式,也是本次ITOO开发所采用的工作模式.本篇博客,就分析在项目中通过Database First模式 ...
- Windows下Qt连接MySql数据库
1.设置环境变量,需添加如下的环境变量: 2.打开Qt Command Prompt,输入第一条命令:cd %QTDIR%\src\plugins\sqldrivers\mysql 后按回车 ...