dffs trigger save
Home › Forums › Modern DFFS › dffs trigger save
- This topic has 6 replies, 2 voices, and was last updated 2 years, 7 months ago by
Bernard Sawma.
-
AuthorPosts
-
-
April 5, 2024 at 12:59 #37616
i have added this customjs JS:
function saveAndSubmit() {
setFieldValue(“Submitted”, true);
dffs_triggerSave(true);
}function save() {
setFieldValue(“Submitted”, false);
dffs_triggerSave(true);
}
var stage=getFieldValue(“Stage”);if(stage==”SendToApprover”)
{
document.querySelector(“div[class^=’panelFooterBtnWrap’]”).insertAdjacentHTML(“afterbegin”, “<input type=’button’ value=’Save’ onClick=’save()’>”);
document.querySelector(“div[class^=’panelFooterBtnWrap’]”).insertAdjacentHTML(“afterbegin”, “<input type=’button’ value=’Save and submit’ onClick=’saveAndSubmit()’>”);
}
else if (stage==”Closed”){}
else
{
document.querySelector(“div[class^=’panelFooterBtnWrap’]”).insertAdjacentHTML(“afterbegin”, “<input type=’button’ value=’Save’ onClick=’save()’>”);
}Now, i have (save) and (save and submit) buttons, but the problem that when clicking them nothing happens, also i am seeing the following error in the console after clicking on both buttons:
Uncaught ReferenceError: dffs_triggerSave is not defined
at save (<anonymous>:8:3)
at HTMLInputElement.onclick (AllItems.aspx?DFFSID=22&DFFSForm=edit:1:1)
VM26457:3 Uncaught ReferenceError: dffs_triggerSave is not defined
at saveAndSubmit (<anonymous>:3:3)
at HTMLInputElement.onclick (AllItems.aspx?DFFSID=22&DFFSForm=edit:1:1) -
April 5, 2024 at 16:21 #37624
Hi,
Which version of the Modern DFFS are you using?Alexander
-
April 5, 2024 at 16:23 #37625
v1.0.25.0
-
April 5, 2024 at 16:31 #37626
OK, then you have to update – the dffs_triggerSave function was added in v1.0.36.0 in October 2023. The current version is now v1.0.53.0.
Alexander
-
April 5, 2024 at 16:33 #37627
How can i update?
-
April 5, 2024 at 16:37 #37628
Follow the instruction here: https://spjsworks.com/install/
Alexander
-
-
April 5, 2024 at 16:57 #37629
Thank you
-
-
AuthorPosts
- You must be logged in to reply to this topic.