Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
1337 Lượt xem

Hi

I have a field in Employee Contract that captures number of days for End Of Service Provision. I want to set a minimum of days to 15days to a contract. Currently its has 0 value by default.


I have set it as required and set condition to >= 15days, but still it keeps saving with any value. How do I go about it?

Thanks



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Ahmed, setting it to required with a condition for number of days > 15, means that a value for the selected field is only required if the number of days field has a value larger than 15. 

From what I understand, you'ld like to set a minimum value, so actually a field validation. I would propose to do that with an automation rule with python code: 

raise UserError("The 'Number of Days' value must be larger than 15")

You can set the automation rule to only address records of the employee contract which are saved (trigger) with Number of Days
Hope that helps, if else let me know on hi (at) latus . ch
Thanks!


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello, what is the benefit of this field and what is it used for? , "number of days for End of Service Provision" 

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Hi Latus,

The code worked fine.

Thanks



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 7 24
859
2
thg 3 24
1748
1
thg 1 24
1820
2
thg 12 23
1371
0
thg 10 22
1549