Skip to main content

Workdoc blocks are not updating in contextual toolbar where as works in add block menu why?

  • September 8, 2023
  • 3 replies
  • 252 views

Forum|alt.badge.img

Hi, I am facing a strange issue while updating the blocks in a workdocs. We have added a doc action in Contextual toolbar and Add block menu which performs same functionality and using Monday SDK to update the doc blocks.

And trying to update the blocks by iterating as suggest in the example app quickstart-workdocs. The code I am using is

const updateBlock = async (id: string, content: any) => {
  const data = await monday.execute('updateDocBlock', { id, content });
  return data;
}

blocks.forEach(async (block) => {
  const content = JSON.parse(block.content);
  const data = await updateBlock(block.id, content);
  return data;
})

The problem is, the doc action is working fine when performed from Add block menu. But while performing the doc action from Contextual toolbar then the changes are applying for first block only and other blocks are not updating. Also I see in network tab it’s making call for first block and not for other blocks. Have anyone experienced the same issue, any idea what could be the reason?

Your help would be greatly appreciated. Thanks

3 replies

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • September 10, 2023

Hello @RambabuPatina,

Would you be able to please send us an email with this information to appsupport@monday.com so we can take a closer look from there?

Looking forward to hearing from you via email!

Cheers,
Matias


Forum|alt.badge.img
  • Author
  • New Participant
  • September 11, 2023

Hi @Matias.Monday Sent an email. Thanks


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • September 11, 2023

We will reply over there then 😁