show problem from the ptask

Richard P
Mega Guru

Manually creating PTASKs from a problem there is a field showing the problem this was generated from, I was surprised that this did not get automatically populated since its just sent me from there and the ptasks are all listed as related lists under that problem

i didnt think it would be difficult for me to automatically populate that field on first load, but Im having some sort of mental block on approaches to doing this, I think its because the ptask is not associated to the problem until after submission, however since we've just selected new from the problem, the system should populated this field instead of the user?

a UI policy I suspect? any advice?

find_real_file.png

1 ACCEPTED SOLUTION

OOB, it should look like this:



find_real_file.png



Does yours show something different?



For the business rule, the conditions could be...



find_real_file.png



and the script could be...


(function executeRule(current, previous /*null when async*/) {


  current.problem = current.parent;


})(current, previous);


View solution in original post

4 REPLIES 4

Tim Deniston
Mega Sage
Mega Sage

The Problem Task is probably currently related to the Problem via the Parent field. You could determine this by looking at the Related List on the Problem form. If it says "Parent = ..." in the breadcrumb/filter, you know it's the Parent field. You could keep the two fields in sync with a simple onBefore business rule, if you wanted to.


the filter on the parent says task=prb000xxxx



I tried with business rule but I couldn't get anything to wor


OOB, it should look like this:



find_real_file.png



Does yours show something different?



For the business rule, the conditions could be...



find_real_file.png



and the script could be...


(function executeRule(current, previous /*null when async*/) {


  current.problem = current.parent;


})(current, previous);


Thanks, you inadvertently pointed me in the right area, seemingly the reason this was not working was because the related list we had in the problem was problem task>task and not problem task>problem as it should be, correctly pointing out that it should say Problem=xxxxx



so once that was corrected, everything else suddenly fitted into place...thanks!