mondaycom / monday-sdk-js

Node.js and JavaScript SDK for developing over the monday.com platform
https://monday.com
MIT License
87 stars 39 forks source link

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

Closed adil-cloudconcept closed 9 months ago

adil-cloudconcept commented 2 years ago

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); });
gregra81 commented 9 months ago

@adil-cloudconcept We recently did some changes in the SDK, including typings, so I wonder if this is still relevant?

gregra81 commented 9 months ago

Closing this as I assume this was solved. Feel free to open a new issue in case you encounter a similar behavior