To get financial dimension value from worker position, add a new method in hcmWorker Table with script like below:

public static str getDimensionValue
(HcmWorkerRecId _workerRecId,
Name _DimensionName,
utcdatetime _asOfDate = DateTimeUtil::utcNow())
{
DimensionAttributeValueSetStorage dimStorage;
str dimValue;
Counter Counter;
HcmPositionDefaultDimension _HcmPositionDefaultDimension;
RecId _DefaultDimension;
;
select _HcmPositionDefaultDimension where
_HcmPositionDefaultDimension.Position == HcmWorker::getPrimaryPosition(_workerRecId);
dimStorage = DimensionAttributeValueSetStorage::find
(_HcmPositionDefaultDimension.DefaultDimension);
for (Counter= ; Counter<= dimStorage.elements() ; Counter++)
{
if(DimensionAttribute::find(dimStorage.getAttributeByIndex(Counter)).Name == _DimensionName)
{
dimValue = dimStorage.getDisplayValueByIndex(Counter);
}
}
return dimValue;
}

After it, if we wanna make display method to show financial dimension, we can use method above. In example we wanna display dimension site from a worker who have PersonnelNumber = "00001". The script is like below :

display str Site()
{
return hcmWorker::getDimensionValue(
hcmWorker::findByPersonnelNumber("").recid, "Site");
}

最新文章

  1. CSS 预处理器(框架)初探:Sass、LESS 和 Stylus
  2. php 经典的算法题你懂的
  3. 【读书笔记】iOS-GCD-API
  4. Spring MVC Spring MyBatis 整合 - 快速上手
  5. C#开源系统大汇总(转)
  6. js获得鼠标的位置
  7. Jquery 计算表格某一列的合计
  8. Android KeyLogger Demo
  9. fatal: The remote end hung up unexpectedly
  10. Linux6.X图形界面如何打开终端以及如何将终端加入右键
  11. java线程安全问题以及使用synchronized解决线程安全问题的几种方式
  12. R语言do.call 函数用法详解
  13. mybatis和hibernate的区别
  14. webclient 操作超时
  15. 关于STM32时钟系统
  16. java.lang.OutOfMemoryError: GC overhead limit exceeded
  17. 运放参数的详细解释和分析-part3,输入失调电压Vos及温漂
  18. 【BZOJ】3683: Falsita
  19. 【Java并发编程】之十三:生产者—消费者模型
  20. jQuery监控文本框事件并作相应处理的方法

热门文章

  1. java类总结
  2. that-annoying-insert-problem-getting-data-into-the-db-using-dapper
  3. jxl 导入excel以及日期格式处理
  4. 菜鸟-手把手教你把Acegi应用到实际项目中(1.2)
  5. 【Base64&amp;UrlEncode】
  6. LICEcap GIF 屏幕录制工具
  7. 跟我学 NHibernate (三)
  8. Mysql-5.7.10启动失败 。
  9. 如何用ASPxTreeView建立三级树(显示及数据绑定)
  10. WebLogic集群案例分析