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/adddependentlookupfield(displayname='FIELD NAME', primarylookupfieldid='LOOKUP FIELD ID', showfield='FIELD NAME') Headers: { "Accept": "application/json;odata=verbose", "Content-Type": "application/json;odata=verbose" }
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' }
Error The ‘inputs.parameters’ of workflow operation of type ‘OpenApiConnection’ is not valid. Error details: The API operation does not allow writing a value for parameter ‘item/YOUR_COLUMN_NAME[0]/Id’. This parameter is read […]
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" […]
Nota: Al final de la explicación está el código entero para copy-paste. Nota: Si no lo ejecutamos directamente desde la SharePoint Management Shell debemos añadir su SnapIn: Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction […]