My notes on command set development for SPO

My notes on command set development for SPO

2018/05/12 SharePoint 0

current list id : this.context.pageContext.list.id
current list title : this.context.pageContext.list.title

for (let row of event.selectedRows) {
let itemId: number = row.getValueByName(‘ID’);
Dialog.alert(`${itemId}`);
}

Get current user email : this.context.pageContext.user.email

import * as strings from ‘SpfxCloneCommandSetStrings’;

this._fieldTypesToIgnore = new Array(
strings.typeCounter,
strings.typeContentType,
strings.typeAttachments,
strings.typeModStat,
strings.typeComputed
);

this._fieldsToIgnore = new Array(
strings.fieldModified,
strings.fieldCreated,
strings.fieldAuthor,
strings.fieldEditor,
strings.field_HasCopyDestinations,
strings.field_CopySource,
strings.fieldowshiddenversion,
strings.fieldWorkflowVersion,
strings.field_UIVersion,
strings.field_UIVersionString,
strings.field_ModerationComments,
strings.fieldInstanceID,
strings.fieldGUID,
strings.fieldWorkflowInstanceID,
strings.fieldFileRef,
strings.fieldFileDirRef,
strings.fieldLast_x0020_Modified,
strings.fieldCreated_x0020_Date,
strings.fieldFSObjType,
strings.fieldSortBehavior,
strings.fieldFileLeafRef,
strings.fieldUniqueId,
strings.fieldSyncClientId,
strings.fieldProgId,
strings.fieldScopeId,
strings.fieldFile_x0020_Type,
strings.fieldMetaInfo,
strings.field_Level,
strings.field_IsCurrentVersion,
strings.fieldItemChildCount,
strings.fieldRestricted,
strings.fieldOriginatorId,
strings.fieldNoExecute,
strings.fieldContentVersion,
strings.field_ComplianceFlags,
strings.field_ComplianceTag,
strings.field_ComplianceTagWrittenTime,
strings.field_ComplianceTagUserId,
strings.fieldAccessPolicy,
strings.field_VirusStatus,
strings.field_VirusVendorID,
strings.field_VirusInfo,
strings.fieldAppAuthor,
strings.fieldAppEditor,
strings.fieldSMTotalSize,
strings.fieldSMLastModifiedDate,
strings.fieldSMTotalFileStreamSize,
strings.fieldSMTotalFileCount,
strings.fieldFolderChildCount
);

https://github.com/SharePoint/sp-dev-fx-extensions/blob/master/samples/js-command-clone/src/extensions/spfxClone/SpfxCloneCommandSet.ts

read count : 1

Leave a Reply

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