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 ...
随机推荐
- VS2013配置WTL90_4140_Final
网上关于WTL的文章,尤其是中文的文章不多,根据收集的资料整理出了VS2013安装WTL的方法. 1.下载.文件很小的,地址:http://sourceforge.net/projects/wtl/f ...
- ee
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Inse ...
- jdk线程的同步问题
一.银行取款引出的问题 模拟银行取钱的例子: public class ThreadDemo06 { public static void main(String[] args) { Bank ban ...
- 在解决方案中所使用 NuGet 管理软件包依赖
使用程序包恢复功能可以在提交源代码时, 不需要将代码库提交到源代码管理中,大幅减少项目的尺寸.所有NuGet程序包都存储在解决方案的Packages文件夹中. 要启用程序包恢复功能,可右键单击解决方案 ...
- (Loadrunner)Error: Failed to send data by channels - post message failed.(转)
把Diagnotics-configure-Web Page Diagnotics 设置为 转自: http://www.51testing.com/html/64/371664-3708254.ht ...
- Object-oriented features
Python is an object-oriented programing language, which means that it provides features that support ...
- Hibernate 常见异常
Hibernate 常见异常net.sf.hibernate.MappingException 当出现net.sf.hibernate.MappingException: Error r ...
- Java基础——左移和右移
首先要明白一点,这里面所有的操作都是针对存储在计算机中中二进制的操作,那么就要知道,正数在计算机中是用二进制表示的,负数在计算机中使用补码表示的. 左移位:<<,有符号的移位操作 左移操作 ...
- 在CentOS 7上安装Python3.5源码包
最近开始系统学习Python 3.5,发现CentOS 7系统自带的python版本是Python 2.7.现在要使用Python 3.5该怎么办?方法大体跟安装其他程序一样.以下为详细经过: 1.事 ...
- C++中“强制转换”的四大天王
哈哈,这个标题有点搞笑了!笑一笑,十年少,希望大家都嗨心! 在C++中主要有四种强制类型转换:static_cast,reinterpret_cast,const_cast,dynamic_cast. ...