I want that some fields are not copied when I copy a new change order. Does anyone know when I should change that in 14.1 pages?
you can modify tmplcopy_site.spl file in this way:
object old, new, chgalg, gl;
old = argv;
new = argv;
chgalg = argv;
gl = argv;
// wiping description
send_wait(0, new, "call_attr", "description", "set_val", "");
You can set empty string, 0 or NULL to decided attribute depending on it's type.
So you would change line number 8?
or line 8 could simply be
new.description = NULL;
and you could add more lines like
new.actual_start_date = NULL;
new.actual_end_date = NULL;
Thanks Lindsay, it's nice to be able to remove some of the non-relevant data like actual start date!
However, I have a slightly different wrinkle - my Change Mgt team wants to copy the ORIGINAL risk value into the new change order. For example if I'm copying from a Risk = 2, then they want the value '2' to copy into the new change. Currently, the risk field value does NOT copy to the new change. Thanks for your help!
new.risk = old.risk;
Hi cdtj ,
If only for the copy function, why to not add the attributes that you would like to be remove from the copy to the exception list of the copy_from_chg() function?
Seems to be more logic vs. to have to clean the attributes after been populated.
This way you also impact only the copy and can still keep your templates working as before.
Of course may you want to have this effect on templates too you will have to use your way.
CA have it on the detail_cr/in/pr/chg:
if ("$args.KEEP.MAKE_COPY" == "1")
var exceptions = new Array();
exceptions = "SET.affected_contact";
exceptions = "SET.requestor";
exceptions = "SET.<YourExcludedField>";
My 2 cents.
Seems that this is better way to restrict attributes in copy.
My solution based on previous experience where copy function were extended: Re: How to Copy Entries in Custom LRel table, so this solution was obvious for me
Yes agree.may you want to extend the attributes to be copied your choice is the right way (if not the only one)
Always several roads to the same city
Tks Everyone that worked!!
Retrieving data ...