Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

Re: Script Editor TestConfiguration

$
0
0

If I take your code and put it on my 11.52 system and comment out the On Error statements, I get an exception.

 

Sub Test_AfterPost
  'On Error Resume Next
     if TestConfiguration_Fields.Field("TSC_USER_01").Value="" then
      TestConfiguration_Fields.Field("TSC_USER_01").Value=Test_Fields.Field("TS_USER_01").value
   end if

  'On Error GoTo 0
End Sub

 

Exception:

Error at Line 64, (character 6)
Object required: 'TestConfiguration_Fields':
====================
    Sub Test_AfterPost
    'On Error Resume Next
==> if TestConfiguration_Fields.Field("TSC_USER_01").Value="" then
    TestConfiguration_Fields.Field("TSC_USER_01").Value=Test_Fields.Field("TS_USER_01").value
====================

 I think in the Test_AfterPost workflow there is no context for the TestConfigurations_Fields object. I don't do a lot of workflow customization but I think the general rule is if you are in an X_something workflow, then it has context only for the X_Fields object. To access other entities, I think you have to use OTA API code to fetch the other entities. In this case, in the Test_AfterPost workflow, you would use API code to fetch the Test Configurations associated to the test, and then set the value for the field.

 

Regarding my suggestion about using .Post - I was mixing up two different methodologies. Using .Post would apply when you use API code to change the value, not when you use the *_Fields methodology to change a value.


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>