Quantcast
Channel: Office 365 for Mac - Recent Threads
Viewing all articles
Browse latest Browse all 5047

Does sharepoitn Online support InfoPath (browser enabled) that has Reference Custom Assemblies?

$
0
0

Hi All,

 

I just done create Infopath from which has custom assemblies. When I publish to form library on SharePoint online it got error message below

 

The sandboxed solution could not be activated. Error Validating assembly "Microsoft.SharePoint.dll"

 

there is some part of my code below in InfoPath form, this code use for extract attachement infopath from and save to another document library.

Public Sub ManageAttachedFile()
            ' Retrieve the value of the attachment in the InfoPath form
            Dim ipFormNav As XPathNavigator = MainDataSource.CreateNavigator()
            Dim nodeNav As XPathNavigator = ipFormNav.SelectSingleNode("//my:fldAttachment", NamespaceManager)

            Dim attachmentValue As String = String.Empty
            If nodeNav IsNot Nothing AndAlso Not [String].IsNullOrEmpty(nodeNav.Value) Then
                attachmentValue = nodeNav.Value

                ' Decode the InfoPath file attachment
                Dim dec As New InfoPathAttachmentDecoder(attachmentValue)
                Dim fileName As String = dec.Filename
                Dim data As Byte() = dec.DecodedAttachment

                'Assign reqID
                Dim ipFormNavReqID As XPathNavigator = MainDataSource.CreateNavigator()
                Dim nodeNavReqID As XPathNavigator = ipFormNav.SelectSingleNode("//my:fld_ReqID", NamespaceManager)

                ' Add the file to a document library
                Using site As New SPSite("https://myOffice365.sharepoint.com/appMedInfo/")
                    Using web As SPWeb = site.OpenWeb()
                        web.AllowUnsafeUpdates = True
                        Dim docLib As SPFolder = web.Folders("MedInfoDoc")
                        docLib.Files.Add(fileName, data)
                        docLib.Item("fld_ReqID") = nodeNav.Value
                        web.AllowUnsafeUpdates = False
                        web.Close()
                    End Using
                    site.Close()
                End Using
            End If
        End Sub

 

 

 

 


Viewing all articles
Browse latest Browse all 5047

Trending Articles



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