Action: Send an HTTP request to SharePoint Endpoint: _api/web/fields/addfield Body: { 'parameters': { '__metadata': { 'type': 'SP.FieldCreationInformation' }, 'FieldTypeKind': 7, 'Title': 'MemberAssociation', 'LookupListId': '3a47bba0-4536-4bed-92b8-3472473f351e', 'LookupFieldName': 'Title' } } Esta acción […]
Action: Send an HTTP request to SharePoint Endpoint: _api/web/fields('FIELD_ID') Headers: { "Content-Type": "application/json;odata=verbose", "IF-MATCH": "*", "X-Http-Method": "PATCH" } Body: { '__metadata': { 'type': 'SP.FieldLookup' }, 'Group': 'YOUR GROUP NAME' }
Con este script podeis crear columnas del tipo Lookup a una lista en SharePoint: $web = Get-SPWeb "WEB_URL" $list = $web.Lists["LIST_NAME"] $lookupFieldXML = '<Field Type="Lookup" DisplayName="NEW_FIELD" Required="FALSE" EnforceUniqueValues="FALSE" List="{LIST_ID}" ShowField="Title" […]