October 19, 2013

How to Pre-populate CC or BCC in Siebel F9 Functionality?

Siebel F9 Email Client no doubt is one of best out of the box functionality of Siebel. It has lot of its logic built into the classes thus presents some limitations. In our previous post we saw how we can bring data from child business component data into email body.

In this posts lets see how we can pre-default CC or BCC recipients using some scripting. Out of the box
when ever Send Email method is invoked from on any Siebel Applet, Send Communication Applet is opened, and "To" email field is populated with the value of the field specified in Recipient Email Address Field  user property on the BC.

However there is no way we can pre-default CC and BCC fields out of the box. With the help of small script on  Send Communication Applet can set the value of To Email, CC, BCC and Email Body as well. This can be useful little customization that can help to pre-populate data which can not be achieved using email templates and recipient groups.

function WebApplet_Load ()
{
    var oBC = this.BusComp();
    oBC.SetFieldValue("Email BCC Line","a@a.com");
    oBC.WriteRecord();
}

Siebel Email Client - Siebel 7.8
Hope it helps

-Jim

14 comments :

  1. clean solution, thanks for sharing.

    ReplyDelete
  2. after adding this code , f9 email applet dont get popped up ?!

    ReplyDelete
    Replies
    1. if you have any error on applet load script it might stop popup to show. try the exact code which is posted on "send communication applet".

      if you are trying to fetch the value from some other BC through applet load script it might not work, instead set the profile attribute on pre invoke of FileSendMail method and use the value of profile attr on applet load of send communication applet.

      see http://howtosiebel.blogspot.in/2013/06/not-able-to-send-child-buscomp-fields.html

      -Jim

      Delete
  3. Thank you Jim,

    I have another question.

    I have a custom field which holds email address in the Admin- Communication -> Templates View.
    I have to populate this email address field in the To/CC when I select this particular template in the F9.

    Is this possible by custom code ?

    Thanks!

    ReplyDelete
  4. Yes it is possible, you will need to query the admin BC in the email popup applet script.
    -Jim

    ReplyDelete
  5. Good solution. Any pointers how to achieve this if Email Client is Microsoft Outlook as applet "Send Communication Applet" will not be used?

    ReplyDelete
  6. Thank you,

    but how i can change the subject line?

    If the subject line (field: 'Description') has more then 150 Char, the applet will be not open! So I want to short the subject line to 150 char.

    Any idea?

    Best Wishes,
    MM.

    ReplyDelete
    Replies
    1. If business cant work with 150 char, consider showing new field on UI and use profile attributes to set the subject line.

      Delete
  7. Can we add condition as To and subject required and if try to send email without that show error message accordingly?

    ReplyDelete
  8. Sajayan that should be possible.you should write that code on button click of send communication pop-up applet.

    ReplyDelete
  9. I have noticed that one can do this sort of scripting in Comm Outbound Email BusComp as well.

    ReplyDelete
  10. Hi, We had a requirement to customize F9 functionality on Orders. We need to constrain the Pick applet which opens when we click 'To' button. So it should display only the Contacts associated to Order's Account. Do you think it's possible? And the Activities are not associated to Accounts when we send email from Orders. Any idea where we need to configure that to associate it with an Account.?

    ReplyDelete
    Replies
    1. Hi amulya, yes it seems possible. On applet load you can get emails addresses from active BO and constrain the pick applet base on email addresses. The default association I believe can be hard as well by writing code in Comm Outbound Email BC.Jim

      Delete