Re: Users - partymgr send email

Posted by Charles Johnson-4 on
URL: http://ofbiz.116.s1.nabble.com/Users-Search-query-tp138640p138647.html



Si Chen wrote:

> What have you tried, and what happens?  Any log messages?  Clues?
>
> Charles Johnson wrote:
>
>>Si Chen wrote:
>>
>>  
>>
>>>It works out of the box already.  I tested it this morning.  See
>>>http://jira.undersunconsulting.com/browse/OFBIZ-438
>>>
>>>Andrew Sykes wrote:
>>>
>>>
>>>    
>>>
>>>>Hi,
>>>>
>>>>I have been looking into why EditCommunicationEvent in partymgr doesn't
>>>>send an email.
>>>>
>>>>Firstly I couldn't find any code that was attempting to send the email,
>>>>so I added the following
>>>>
>>>>Index:
>>>>applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
>>>>===================================================================
>>>>---
>>>>applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml  (revision 7342)
>>>>+++
>>>>applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml  (working copy)
>>>>@@ -55,7 +55,9 @@
>>>>        
>>>>        <now-timestamp-to-env env-name="newEntity.entryDate"/>
>>>>        
>>>>-        <create-value value-name="newEntity"/>    
>>>>+        <create-value value-name="newEntity"/>
>>>>+               <field-to-field map-name="newEntity" field-
>>>>name="communicationEventId" to-map-name="args" to-field-
>>>>name="communicationEventId" />
>>>>+               <call-service-asynch service-name="sendCommEventAsEmail"
>>>>in-map-
>>>>name="args" include-user-login="true" />
>>>>    </simple-method>
>>>>    <simple-method method-name="updateCommunicationEvent" short-
>>>>description="Update a CommunicationEvent">
>>>>        <check-permission permission="PARTYMGR" action="_CME_UPDATE">
>>>>
>>>>Once this is applied I get an error complaining that the
>>>>CommunicationEvent Entity does not have a contactMechIdFrom. This is
>>>>hardly surprising since when I fill in the form, the "From Email
>>>>Address" drop-down field is empty.
>>>>
>>>>I'm not sure if the above modification is the intended direction for
>>>>this, does anyone have any suggestions?
>>>>
>>>>  
>>>>
>>>>      
>>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>
>>>
>>>
>>>    
>>>
>>It works out of the box already. I tested it this morning. See
>>
>>http://jira.undersunconsulting.com/browse/OFBIZ-438
>>  
>>
>>
>>
>>I'm confused by the above. I'm using 6860 and it certainly doesn't work
>>for me
>>
>>CJ
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>
>>  
>>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>Users mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/users
>

This is the only suspicious-looking log message:

17:02:10,788 (http-0.0.0.0-8443-Processor4) [  
PrimaryKeyFinder.java:132:INFO ] Returning null because found incomplete
primary key in find:
[GenericEntity:CommunicationEvent][communicationEventId,null()]

CJ

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users