Forum Replies Created
-
AuthorPosts
-
If you can create a view in your list that gives you the items you want, you can get the CAML query using this snippet of code. Just hit F12 to bring up the developer tools, select the Console and paste the below snippet (you might have to type in the text “allow pasting” if you cannot paste the text):
const payload = { method: 'GET', headers: { "Accept": "application/json; odata=verbose" }, credentials: 'same-origin' } fetch(_spPageContextInfo.webServerRelativeUrl + "/_api/web/lists/getById('"+_spPageContextInfo.pageListId+"')/views/getById('"+_spPageContextInfo.viewId+"')", payload ).then(data => { return data.json() }).then(json => { console.log(json); console.log(json.d.ViewQuery); });
Alexander
You cannot run async code before save – the built in save method will not wait for it.
I suggest you try triggering the email creation by adding a yes / no field “Schedule emails” or something like that and when you check this field, run your code and then clear all emails in a “Before save of the form” rule.
Alexander
Hi,
There might not be your custom code that causes this issue. It could be some kind of validation error after the item has been submitted to SharePoint that causes the item to not save. All emails in the classic DFFS version are sent after the PreSaveAction function (if any) return true, but before the item is actually saved to SharePoint. This means that if there are validation errors on the server side that cancels the save, the email will be sent but no item will be created in the list.This is a limitation in how the emails work in the classic DFFS version, and if it is causing problems you should use a FLOW (or a SharePoint Designer workflow if you are on-prem) to send an email after the item has actually been saved to the list.
Alexander
November 27, 2024 at 22:40 in reply to: Send email from New Form with link to newly created record #38332Look at the change log for v1.0.75.0 and see if you can use the variables I exposed to accomplish what you want to do.
PS: I just published v1.0.76.0 also: https://spjsworks.com/changelog/
Alexander
November 21, 2024 at 22:50 in reply to: Send email from New Form with link to newly created record #38327Sorry, but I don’t think this kind of solution can be added to DFFS. This is because it in any case requires an external list and a custom FLOW to send the emails, and the technical setup of this would cause a lot of support requests…
I think you are better off setting up a FLOW that runs on a schedule (every hour or every day) looking for items in the list that matches the send date set in a datepicker in the list item. Using a FLOW you can set up different conditions for different statuses, and send emails based on different schedules that reads the data from the list item directly when you send the email in the FLOW.
Alexander
I have added a new option “Clear the previous value before setting new value” to the Set field value action in the rule-builder.
Alexander
November 21, 2024 at 19:35 in reply to: Send email from New Form with link to newly created record #38322You can use the DFFSID (you must add a field with internalname _DFFSID your list and the DFFSID will be autogenerated) like this from an email triggering on any trigger you like:
Here is the new item: <a href="https://contoso.sharepoint.com/sites/YourSite/Lists/YourList?DFFSForm=disp&DFFSID=[[fieldValue:_DFFSID]]">Link</a>
Scheduling emails is not possible directly from DFFSS. You must use a FLOW to achieve this (by adding a send-date field in your list item and using a FLOW that runs on a schedule every day looking from send-date match in the list).
Alexander
- This reply was modified 4 weeks, 1 day ago by Alexander Bautz. Reason: Fixed link-format
Hi,
Are both of your people picker fields multichoice?Alexander
November 20, 2024 at 23:29 in reply to: Embedded List Webpart – Cannot read properties of null (reading ‘closest’) #38316Hi,
This issue is fixed and I’ll release a new version tomorrow.Alexander
November 19, 2024 at 18:38 in reply to: Embedded List Webpart – Cannot read properties of null (reading ‘closest’) #38313Hi,
Sorry for the inconvenience, I have confirmed this bug and will get it fixed as soon as possible and release a new version.Alexander
1. Yes, but the code is changed to support emailing the form with the correct layout – the styling is inline on the HTML elements. Look through my changed code and amend yours to match.
2. The styling is moved inline in the style attribute on the element and the class is no longer needed.
3. It is used only as a selector and not to style the element and is not defined anywhere.
Alexander
The people picker field loads async because it evaluates all entries to ensure they are valid choices. I assume that this process is slow for some reason.
I’m glad you figured out a solution.
Alexander
You can remove the classname “statusBannerIcon” from the HTML code and also remove the class from your Custom CSS.
Alexander
The approvalWfStatus class is used in the HTML code in the tab.
I finally understood that you were emailing the tab and not printing it…
The reason that it doesn’t work when emailing is that external stylesheets are not supported (not in DFFS, but in email clients). If you want the icons to show in the email you must add all styling inline in the HTML code – something like the attached file.
Alexander
Attachments:
I have a few other issues left before I can release the next version, but hope to get it done during the weekend.
Alexander
-
AuthorPosts