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]的更多相关文章

  1. 苹果开发者账号申请时报错提示错误:Legal Entity Name

    he information you entered did not match your profile in the D&B database. Before submitting you ...

  2. 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 ...

  3. Worker Thread

    http://www.codeproject.com/Articles/552/Using-Worker-Threads Introduction Worker threads are an eleg ...

  4. Simple Worker Thread Class

    http://www.codeproject.com/Articles/36184/Simple-Worker-Thread-Class Introduction Many times we need ...

  5. use worker without js file

    var blob = new Blob(['onmessage=function(e){postMessage(e.data);}']); debugger; // Obtain a blob URL ...

  6. [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 ...

  7. html5 web worker学习笔记(记一)

    (吐槽:浏览器js终于进入多线程时代!) 以前利用setTimeout.setInterval等方式的多线程,是伪多线程,本质上是一种在单线程中进行队列执行的方式.自从html5 web worker ...

  8. [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 ...

  9. ra_interface_lines_all 接口表各字段说明

    note:Description and Usage of Fields in RA_INTERFACE_LINES Table [ID 1195997.1] 核心内容: Field Name and ...

随机推荐

  1. java重写

    1.当子类重写父类方法时,修改方法的修饰权限只能从小的范围到大的范围改变,不能从大的范围向小的范围改变,public  protected  private,[权限篇] 2.子类重写父类方法还可以修改 ...

  2. c# .NET 进行数据库备份和还原

    本文主要内容来源stswordman的介绍,开发环境为10,数据库为08R2 原文地址http://www.cnblogs.com/stswordman/archive/2006/08/06/4690 ...

  3. keypress

    onKeyUp="keypress2(this,140)" onblur="keypress2(this,140)"<span>你还可以输入140个 ...

  4. Hibernate——主键配置

    <id>元素中的<generator>用来为该持久化类的实例生成唯一的标识,hibernate提供了很多内置的实现. Increment:由hibernate自动递增生成标识符 ...

  5. 03-position和anchorPoint

    *:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...

  6. Oracle 存储过程包

    create or replace package body cuttoship_lots is procedure prod_run(p_w_day date) as begin delete cu ...

  7. TypeError: validator.settings[("on" + event.type)].call is not a function

    昨天遇到此错误信息,下面是调试后正确的代码: $("#inputForm").validate({//inputForm是对应的表单的id onkeyup:false, onfoc ...

  8. linx 实用操作命令二

    pcre相关操作pcretest -C #查看pcre是否支持utf8 rpm -q -a #查看软件包列表rpm -ql pcre-7.8-6.el6.x86_64 #查看包安装的位置rpm -e ...

  9. 关于cookie

    CookieHelper.WriteCookie("DEPID", "theway", depid);   //先写入cookie //再读取cookie Us ...

  10. 利用JSONP进行水坑攻击

    0x00 简介 前几天安全研究者Jaime Blasco发现了在中国某些特定主题的网站被进行了水坑攻击,攻击方法有一定多样性,其中存在一些比较少见于此类型攻击中的技术,不过其实是比较早的技术了,国内猥 ...