Replace Link to DatoCMS record by Link to URL

Hi,

We have a structured text field on a model. On that field we have an entry of “Link to DatoCMS record”. Can we update the record using “Content Management API” by replacing that “Link to DatoCMS record” to “Link to URL” ?

Basically, we want to replace that “Link to DatoCMS record” by “Link to URL” on that structured text field using content management api. Replacing “itemLink” by “link”.

Thanks,
Jyotirmoy Biswas

Hi! Yes you can! You can use this lib to replace all the itemLink nodes with link nodes!

Fetch the records, pass the current structured text values and a map function to unist-util-map, and use the result to make a record update API call!

Hi,

Thanks for your feedback.

Thanks again,
Jyotirmoy Biswas