CopyRefObjTestPlan
You can use the CopyRefObjTestPlan function to automatically transfer a test plan from a reference object to a newly created object. This is commonly used in copy methods when creating objects from references, ensuring that test plans are preserved across related objects.
When to use
You can use this function when creating a new object from a reference, such as a Formula from a Project, and need to copy the associated test plan.
Syntax
object CopyRefObjTestPlan();
Return Value
An object is returned displaying the result of the operation.
Impact
The changes are applied to the new object immediately.
Prerequisites
Returns an object indicating the result of the operation.
Examples
- Example 1
-
Basic Test Plan Copy
object des = ObjProperty("DESCRIPTION", "PROJECT", CONTEXT._REFOBJECTKEY); long rc = ObjPropertySet(des != null ? des.ToString() : "", 0L, "DESCRIPTION", "", ""); long rc2 = CopyRefObjTestPlan();
- Description
- This script is in a copy method for a formula created from the References tab of a project (Object Type =FORMULA, Reference Type = PROJECT, Events = Create From As New). It is PROJECT FORMULA PLAN in the seed database.