monday-sdk-js icon indicating copy to clipboard operation
monday-sdk-js copied to clipboard

[Bug] Unable to get boardViewId from monday.get("context")

Open adil-cloudconcept opened this issue 4 years ago • 0 comments

i am using monday.sdk.js for the very first time and as per documentations i can get boardViewId and boardId from monday.get("context") but this is not working in my case.

the format i am getting is

boardIds: [11111111]
editMode: true
instanceId: -1
instanceType: "board_view"
itemIds: undefined
region: "use1"
theme: "light"
user: {id: '1111111', isAdmin: false, isGuest: false, isViewOnly: false}
viewMode: "fullscreen"

implementations

  this.mondaySdk.get('context')
     .then(async context => {
       this.boardConstants.boardId = context.data.boardId;
       this.boardConstants.viewId = context.data.boardViewId;
       await this.initQuery(this.boardConstants.boardId);
     })
     .catch(error => { throw new Error(error); });

adil-cloudconcept avatar Nov 19 '21 07:11 adil-cloudconcept