Is there a way to make email notification on the change log of a specific form? My manager wants to receive email every time there is changes in Part form and he wants to know also the specific changes occured on that form.
Please help. Thanks.
Are you asking about the actual form or when a part record changes?
You could add an email widget to the DD that is maintaining the Change Log for the Part table.
Or you could make a DD to email you when the ChgLog table changes. Use a condiotion block to filter out for just changes to the part table.
Note that the second method is a little “Inceptiony”
Yes sir, i am referring to any part record that changes. The specific changes should appear in the email notifications.
Sir, I tried already in DD but in the in-transaction method where the Change Log widget is available, there is no email widget there.
And also in ChgLog table, only few field names there are available. It cannot generate the specific changes of any form.
As in one the previous replies, probably best just alerting off one changes to the part table rather the change log.
Yes sir. But is there a way to receive email with the specific changes of part fields?
here is a sample of an alert I do on part change for a few fields. It is on a data directive on the part table in transaction. I left all of the specific conditions in the code, so you could see all of the potential uses. You will have to modify to fit your needs.
Email Part Changes Example.cs (8.0 KB)
In the BPM designer sir, in In-transaction method, did you add other widgets before the Execute Code widget? Or just the Execute code widget only with the code inside?
Ok sir, thank you. I will check your codes now, and make a test on it.
Unfortunately sir, it didn’t work on our side. Maybe I wasn’t able to modify the codes well. I only changed the email addresses there and some part field for instance the Part.Date01 which is not available on the part table so I changed it to Part.CreatedOn. But still I’m not receiving any emails when I tried to test it.
How many fields you need to supply an email if a change occur? If it is a lot, maybe a simpler solution would be to activate the changelog in Part DD, for all the fields you need to catch. Then add a DD for the ChgLog table, add a condition widget if TableName=‘Part’ just send a general email that a change has happened), and you can add the change log details LogText into the email…
So you create a in-transaction directive with the condition that TableName=“PART”. and add the widget to call a standard one (because that is where the email widget is…).
Then the condition of the standard one is to be called by the in-transaction “testPierre”
Works… just tested the received email:
So it sends all the changes of the day…seems to. (i checked all the record types…)
I think that would suit your need. using Epimagic… And not much code involved… !
You can make a nicer look of your e-mail using HTML coding too…
Anyway…I think worth the try…
Sir, just one question. How did you add the change log details LogText into the email? Im confused.
When you add the email widget, you can insert table contents or ContextData elements.
It is a button called Insert…on bottom of the email form.
So I inserted the PartNum (Key1) the date (DateStampedOn)
and the details (LogText)
Yes, you will have to understand the code to make it work. I would recommend going thru the ICE guide examples. I made a simple example that will send the email on every update of part until the conditions at the bottom at uncommented. set vTo to a valid email and it should send.
Email Part Changes Simple Example.cs (3.7 KB)
I didn’t noticed that there are two similar tables of change log which are ChangeLog and ChgLog that is why I’m confused where you took the Key1 and LogText fields because I used the ChangeLog table instead of the ChgLog . Now I’m trying to use the ChgLog table and hope it works.
Thank you sir for the support.
See you soon.
Ok sir, I will try your codes again. And I will analyze and understand it first.
Thank you sir.
The Part Changes Email example was fabulous.
For some reason I do not have the email widget but the C# code gave me enough to create my own email data directive. Thank you kindly!
Hi @Hogardy , I tried your solution but how can I select the part table as condition under chnglog directive?