Want to achieve the same through script runner behaviour, but not happening:
Trying below code :
const descField = getFieldById("description");
// Get existing value
const currentValue = descField.getValue();
// Only set if description is empty
if (!currentValue || !currentValue.content || currentValue.content.length === 0) {
descField.setValue({
version: 1,
type: "doc",
content: [
{
type: "table",
content: [
{
type: "tableRow",
content: [
{
type: "tableHeader",
content: [
{
type: "paragraph",
content: [{ type: "text", text: "Field" }]
}
]
},
{
type: "tableHeader",
content: [
{
type: "paragraph",
content: [{ type: "text", text: "Details" }]
}
]
}
]
},
{
type: "tableRow",
content: [
{
type: "tableCell",
content: [
{
type: "paragraph",
content: [{ type: "text", text: "" }]
}
]
},
{
type: "tableCell",
content: [
{
type: "paragraph",
content: [{ type: "text", text: "" }]
}
]
}
]
}
]
}
]
});
}
Hi,
Can you elaborate what is not working ?
You can use this ADF builder to create the content you want and past it into behaviour
Document builder
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.