Quantcast
Channel: Question and Answer » web-services
Viewing all articles
Browse latest Browse all 136

how to delete a sealed field

$
0
0

How can I use Lists.asmx?op=UpdateList and JavaScript to delete a sealed field?

My code works to create/update fields. I used it to create a sealed field. Then later I’m trying to delete it but it won’t work. The relevant parts of what I’m trying are below.

The SOAP XML:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <UpdateList xmlns="http://schemas.microsoft.com/sharepoint/soap/">
            <listName>listName</listName>
            <deleteFields>
                <Fields>
                    <Method ID="1">
                        <Field Name="oldFieldName"/>
                    </Method>
                </Fields>
            </deleteFields>
        </UpdateList>
    </soap:Body>
</soap:Envelope>

The response XML:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <UpdateListResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
            <UpdateListResult>
                <Results>
                    <NewFields/>
                    <UpdateFields/>
                    <DeleteFields>
                        <Method ID="1">
                            <ErrorCode>0x80004005</ErrorCode>
                            <ErrorText>Operation Failed</ErrorText>
                        </Method>
                    </DeleteFields>
                    <ListProperties removed for brevity/>
                </Results>
            </UpdateListResult>
        </UpdateListResponse>
    </soap:Body>
</soap:Envelope>

Viewing all articles
Browse latest Browse all 136

Trending Articles