Which code segment should you add at line 6?

You have a Microsoft Office InfoPath form that is published using InfoPath Services. You plan to publish a new version of the InfoPath form. You need to take the current InfoPath form offline and must ensure that users who currently have the form open have one hour to complete the form.

You write the following code segment:

01: Dim services as SPServiceCollection = SPFarm.Local.Services
02: Create svc as SPService in services
03: Dim fs As FormService = Try Cast(svc, formService)
04: If fs is not Nothing Then
05: Dim ft as FormTemplate = fs.FormTemplates(“myForm”)
06: …
07: End If
08: Next

Which code segment should you add at line 6?

You have a Microsoft Office InfoPath form that is published using InfoPath Services. You plan to publish a new version of the InfoPath form. You need to take the current InfoPath form offline and must ensure that users who currently have the form open have one hour to complete the form.

You write the following code segment:

01: Dim services as SPServiceCollection = SPFarm.Local.Services
02: Create svc as SPService in services
03: Dim fs As FormService = Try Cast(svc, formService)
04: If fs is not Nothing Then
05: Dim ft as FormTemplate = fs.FormTemplates(“myForm”)
06: …
07: End If
08: Next

Which code segment should you add at line 6?

A.
ft.Deactivate(SPContext.current.site)
System.Threading.Thread.Sleep(New TimeSpan(1, 0, 0))
ft.QuiesceEndTime()

B.
ft.Delete()
System.Threading.Thread.Sleep(New TimeSpan(1, 0, 0))
ft.QuiesceEndTime()

C.
ft.Quiesce(New TimeSpan(1, 0, 0))

D.
System.Threading.Thread.Sleep(New TimeSpan(1, 0, 0))
ft.Quiesce(New.TimeSpan(0, 0, 0))



Leave a Reply 0

Your email address will not be published. Required fields are marked *