| || |
Bug_CanPost - does this apply to defect details
Hello Forum -
I am running into an issue of consistency between the Add Defect vs. Defect Details screens. To explain, I have a primary due date field, and several secondary due date fields. The code I am wrote prevents the secondary due dates from occurring after the primary due date. The code was put into the function Bug_CanPost, and essentially says - if primary date field is modified, then if the secondary date field is greater than primary field, the function is false.
This works fine when I am submitting the initial defects...however, after the defect has been submitted, and the view changes from Add Defect to Defect Details, the code does not work. I am able to open up the record and use any date value, no error message, no prevention of posting.
So, where else do I need to call this code from? I was reading the admin guide, and saw mention of some other places. Any advice??
Re: Bug_CanPost - does this apply to defect details
IS there any boolean flag etc that you are using in the code. Maybe if that is set for the new bugs then only the code works. You can check that.
Else you can put the code in Bug_FieldCanChange. Capture the initial value of the secondary date in variables. If secondary is greater than primary then set the function to false and change the values to the initial ones.
Let me know if it works. Also it would be nice if you can put your code for us to see the issue.