The wait statement worked for one occasion, but it didnt help me in same error at other place in my script.
Can you give some broader explanation for the second choice which you suggested i.e. for checking property which changes dynamically.
Also my query is that should we check property for the parent object or child object(for this error) .
Please help me out as i am a newbie in QTP.
If the error you are getting is "Cannot find the "OK" object's parent "Trustix Antivirus-Scan" (class Dialog). Verify that parent properties match an object currently displayed in your application" then this means QTP cannot locate the Dialog box. So you've got to check the properties for the dialog box (Parent).
If the wait statement worked for you on one occasion and if the test is on the exact same object it should work the second time too. Maybe you should play around with the wait interval.
My second point - go to the OR and check the Dialog's properties. Do you see anything which could possibly change during runtime? Usually this maybe an innertext, title or value field. If so try not using this property to identify the object or if that doesn't work you will have to resort to using regular expressions.