[question]It hasn't effect to sent a email by workflow in primary rule using Javascript condition

  • sage7.0.c.1

    Hi all,

    I want to sent a Email when I insert a new record into database。

    For Example,if someone add a record and the value of a Field is 9(example:statu = 9),then atuo sent a Email to a user,how to achieve it?

    Dose it can be achieved by workflow?

    Thank all of you first!

  • Hello Roim

    The easiest way of sending an email is using the Quick or Simple Notifications.  Please see the Admin Guide:  www.sagecrm.com/.../Default_CSH.htm

    Notifications can be created on all the main entities like Company, Case, Opportunity etc.

    You can also use Table Level Scripts.

    There are articles on how to do this elsewhere on the site.

    I hope that helps.  


  • Hi,

     

    There are many ways you can achieve this requirement. For sending an email through COM API, you can refer below blog post on this site. 

    https://community.sagecrm.com/partner_community/b/hints_tips_and_tricks/archive/2009/03/13/sending-emails-in-asp-com-api.aspx

     

    Also you can refer various email customization discussions on our blog site through below link.

    http://sagecrmaddons.blogspot.com/search/label/Email

     

    1.     If you have custom entity you can use the code in the first link above to send an email based on your requirement.

    2.     Table Level Script: You can write table level script for your entity and put the function on PostInsertRecord area of the same to send an email. You can use the similar code given in the first link. Track the condition you want in TLS before sending an email.

    3.      Workflow: You can also accomplish this through workflow. If you have workflow for your entity you can add Send Email action on primary rule.

     

    Regards,

    Dinesh

    ----------------------------------------------------------------------------------------
    Greytrix
    It's time to think outside the box.

    GUMUTM: Migration and Integration solutions for Sage CRM,
    Sage SalesLogix,
    Sage CRM.com, ACT!, Sage Accpac, Sage Pro, Sage MAS 90/200/500 ERP.

    Greytrix : facebook | twitter | LinkedIn
    blogs: CRM :
    http://sagecrmaddons.blogspot.com | MAS : http://sagemas.blogspot.com/
    E-mail: crm@greytrix.com   |  web: www.greytrix.com  |  Support : Live Help

    ………………………………………………………………………………………………………………………………… 

     

     

    --------------------------------------------------------------------------------------------------------------------------------------
    New Release - Sage CRM for Sage ERP X3 - real-time, bi-directional, anywhere access.
    Celebrating 900+ Sage CRM Posts
    - http://www.greytrix.com/blogs/sagecrm/
    Sage Premier Gold Development Partner - Sage X3, Sage 100/300/500/Pro ERP & Sage CRM
    *Sage CRM Gold Development Partner of the Year 2004 and 2011*
    E-mail: crm@greytrix.com |  Twitter: greytrix

  • I used workflow by primary Rule,and writed <plscourse.plsc_allowadd == 'N'> in Javascript condition,but the Email was sent everytime when I inserted a new record,the condition has not effect. what should I do?

  • Try

    if (plscourse.plsc_allowadd =='N')

    {

    Valid = true;

    }

    else

    {

    Valid = false;

    }


  •  

    Is there something wrong?The 'Valid' doesn't work. It still send Email everytime.And I only write <Valid = false> in Javascript condition,it also send Email everytime when I add a new record.

  • Roim, remove 'Try' from your script....

    Regards,

  • I write nothing but 'Valid = false', it still hasn't effect . The version of sgecrm I used is sage7.0.c.1.

  • Probably because this is a Primary rule and will have no effect of Valid clause...it will run irrespective of whether Valid is true or false...let me look more into this....

    Regards,