Forum Replies Created
-
AuthorPosts
-
Where did you get the rest of the code from? – I’m guessing the code has been copied from somewhere, but you forgot to include this one function.
Without knowing exactly what you want to do with the rest of the code I’m not sure if just writing a code example will work for you, but from the function name I’m guessing it could be done something like this:
function setFieldDisabled(fin, disabled){ if(disabled){ spjs.dffs.doReadOnly([fin]); }else{ spjs.dffs.undoReadOnly([fin]); } }
Alexander
I replied to your question here: https://spjsblog.com/forums/topic/v4-4-5-55-has-been-released/#post-38556
Alexander
Hi,
This error states that you are missing a function named setFieldDisabled. If you have copied this custom js code from another site you must ensure you include this function also.Alexander
Hi,
I have confirmed a bug where “[[item:link_disp]]” and “[[item:link_edit]]” fails to pick up the ID of the item from NewForm and also fails to get the correct PageType. I’ll get it fixed and publish a new version tomorrow.You can construct the link manually like this – I think it should work in the current version also:
https://contoso.sharepoint.com/sites/your_site/_layouts/15/SPListForm.aspx?PageType=4&List=your_list_guid&ID=[[fieldValue:ID]]
Alexander
This should be fixed by adding min-width in the new version v1.1.5.0.
Alexander
I think I found what caused the bug, but cannot tell exactly why it suddenly started to fail after 15 years – it must be a browser issue I guess.
Let me know if the new version (DFFS v4.4.5.54 / vLookup v2.2.167) makes any difference.
Alexander
OK, one option is to manually add the Content Editor Web Parts that loads DFFS to the forms (NewForm, DispForm and EditForm). Just open the form and edit the page and insert a CEWP above and one below and refer a working list to copy the Content Link URL. Set both the webparts as Hidden.
This will “install” DFFS without using the DFFS Installer.
Alexander
Did you try my suggested solution (installing DFFS in the subsite and installing it from there)?
Alexander
Can you email me the external js-file (or at least an example of a function) so that I can see the relationship between the custom js function and the one loaded in the external file?
I tried going back to v1.0.50.0, but still could not get a function in Custom JS marked as async to load from a rule, or from a call from an external file.
Alexander
Hi,
I have tested and I’m not able to call a function marked as async from a rule in v1.0.83.0 either.I’m not sure why you would mark the function as async in the first place – can you explain what you are trying to do?
I tested calling a synchronous function that again calls an asynchronous function and it works as expected.
I tested using this custom js:
async function asyncFn(){ console.log("Running async function..."); return "This is a message from the async function..."; } function syncFn(){ console.log("Running sync function..."); asyncFn().then(message => { console.log(message); }); }
I called the “sync” function from a rule and this is the console output:
21:56:01.431 VM92546:25 Running sync function... 21:56:01.431 VM92546:20 Running async function... 21:56:01.435 VM92546:27 this is a message from the async function...
Alexander
You must turn it on in the Miscellaneous tab in the DispForm configuration – see screenshots.
Alexander
I deleted the one I had in my app catalog and downloaded the latest one from here:
It shows as 1.1.4.0 – see attached image.
Can you try deleting it from the app catalog and then empty the recycle bin and add it again?
Alexander
Attachments:
Hi,
I have released a new version that I think should fix the web selector issue in vLookup. Check out the change log here: https://spjsworks.com/changelog/Alexander
Can you email me some more details / screenshots so I’m sure I fully understand what you mean?
Alexander
Hi,
I’ll add this info as a third parameter (boolean) to the function in the next version – so you can use it like this from v1.1.4.0:function dffs_PreSaveAction(exit, autosave, goToEditForm){ // Your own code here }
I hope to get the new version out later this week.
Alexander
-
AuthorPosts