Salesforce-跨对象字段
我有两个自定义对象“用户名”和“薪水”。两个对象之间存在查找关系。对于每个用户名,都有许多工资记录。我想要一个字段,即“可用薪水”,它从特定用户的所有薪水记录中添加“净薪水”记录。我应该在用户名中添加这个字段吗?请告诉我这个公式以及我应该在哪个对象中创建这个字段?
I have two custom objects 'User Name' and 'Salary'. There is a lookup relationship between the two objects. For every User Name, there are many salary records. I want one field,that is, 'Available Salary' to be there which adds the 'Net Salary' records from all the salary records for a particular user. Should I make this field in User Name?? Please tell me the formula for this and in which object should I make this field??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您准备将查找关系更改为主/详细信息,那么您将能够在计算子记录总和的 UserName 对象上创建汇总汇总字段。如果必须进行查找,那么我认为您唯一的选择是编写一个顶点触发器来更新 userName 对象。
If you were prepared to change the lookup relationship to be master/detail, then you'd be able to create a roll up summary field on the UserName object that calculated the sum of the child records. If it has to be a lookup, then i think you're only choice would be to write a apex trigger to update the userName object.