Populate a field via mailGetAddrs

Hello,
I have created a local .js file with the following to allow the restricted mailGetAddrs function to work:
// Trust the mailGetAddrs function
KCI_mailGetAddrs = app.trustedFunction( function (cTo, cCc, cBcc, cCaption, bCc, bBcc)
app.beginPriv();    // Explicitly raise privilege
app.mailGetAddrs( cTo, cCc, cBcc, cCaption, bCc, bBcc );
app.endPriv();
I then created a text field, called "Grantee"  I want to have this field look up an employee in our Outlook Contacts, so I put the following in a Mouse Up JavaScript:
var attempts = 2;
while (attempts > 0)
var recipients = KCI_mailGetAddrs
cCaption: "Select Recipient, Please",
cTo: true,
bBcc: false
this.getField("Grantee").value = recipients;
if (recipients == "" ) {
if (--attempts == 1)
app.alert("You did not choose any recipients, try again");
} else break;
if (attempts == 0)
app.alert("Cancelling the selection");
else {
this.getField("Grantee").value = recipients;
Apparently recipients is not being defined, as it places "undefined" in the Grantee field.  What I want is the person's name, or at the very least their e-mail address.  The this.getField("Grantee")...  was placed in the middle of the above code to try to figure out what was being returned.
When I test this out a window opens called "Check Names" and has amessage stating "Microsoft Outlook does not recognize "[object Object]". and has a button to "Show More Names..." which takes me to the Address Book listing where I can select an employee.  I do this, but nothing is set in the function.
What am I missing here?

So I now have the trusted function as:
// Trust the mailGetAddrs function
KCI_mailGetAddrs = app.trustedFunction( function (cTo, cCc, cBcc, cCaption, bCc, bBcc)
// Additional code may appear above
app.beginPriv();    // Explicitly raise privilege
var funcreturn = app.mailGetAddrs( cTo, cCc, cBcc, cCaption, bCc, bBcc );
// return app.mailGetAddrs( cTo, cCc, cBcc, cCaption, bCc, bBcc );
// funcreturn = "Memememe!!";
app.endPriv();
// Return the returned information.
return funcreturn;
And my script is:
var attempts = 2;
while (attempts > 0)
var recipients = new KCI_mailGetAddrs
cTo: "[email protected]",
cCc: "",
cBcc: "",
                        cCaption: "Select Recipient, Please",
                        bCc: true,
                        bBcc: true
this.getField("Grantee").value = recipients;
                if (recipients == "" ) {
if (--attempts == 1)
app.alert("You did not choose any recipients, try again");
} else break;
if (attempts == 0)
app.alert("Cancelling the selection");
else {
this.getField("Grantee").value = recipients;
So when I click the field, a Check Names window opens with
Microsoft Outlook does not recognize "[object Object]
Select the Address to Use:
then a field with no names, but a button to "Show more Names..."  When I click this, I get the Contacts list with only a To option for recipients.  IF I select one, the "Grantee" field gets this:
[email protected],undefined,undefined
(NOTE:  [email protected] and [email protected] are not the actual values used. Real values are used, but removed from this post.)
I have also tried passing the person's name as listed in the Contacts list.  Neither of these do anything.  Also, I have passed nothing here.  All gives the same result.
The problem seems to be that Outlook is not understanding what is being passed, or I am not passing it correctly.  At least I am getting an address.
Any insight on how what might be causing the Outlook message?  Also, how would I get just the email address in the PDF's script?  I know I con process it out by truncating the string to the first comma, but there must be a better way.  recipients.cTo does not get it, which is what I thought I would use.

Similar Messages

  • How do I redirect to a page via a button but also populate a field on page2

    I am trying to redirect to a second page via a button but at the same time populate a item on the second page from a function that returns a sequence.
    I tried all sort of methods, adding page processing, adding dynamic actions, adding branching and cannot get this to work.
    The button must create a new record on the second page, but populate unique key at the same time. Because redirecting does not Submit, adding page processing AFTER submit does not work. I get that, but the following also will not work and I don' know why
    Create dummy field on page 1
    Create page processing that populates the field via PL/SQL "On Submit"
    Create Region button that simply Submits page
    Create branch that on submit redirects to second page and moves the value from the dummy field on first page to the field on the seocnd page.
    I am new to Application Express and love trying to figure issues out myself but am at a loss with something that should be so simple. Any help would be appreciated.
    Stewart

    Hi,
    As i understand from your requirement,
    I am trying to redirect to a second page via a button but at the same time populate a item on the second page from a function that returns a sequence.You want to goto page 2 from page one on click of a button, and when loading the page two you want to populate the item on page two with a sequence number.
    if that is the case, try using Button,
    Action: Redirect to page in this application
    then on page two, create a page process,
    Process Point:*On load before header*
    Source >> Process >>
    begin
    select seq_name.nextval into :P2_ITEM from dual;
    end;this should do your requirement.
    Regards,
    Little Foot

  • How do I populate a "Person or group" field via Elements.xml?

    So I have created a field titled "EmployeeName" and it's a "Person and Group" type. (View the Schema.xml below)
    <Field Name="EmployeeName" ID="{8579a35a-71a8-4070-b907-b6ede0daa352}" DisplayName="Employee Name" Type="User" />
    Now, I'm trying to populate the column via the Elements.xml file. As you can see by the commented out code below, I've tried every combination and I'm still unable to populate this column:
    <ListInstance Title="Employee_Rec_list" OnQuickLaunch="TRUE" TemplateType="10000" Url="Lists/Employee_Rec_list" Description="My List Instance">
    <Data>
    <Rows>
    <Row>
    <!-- <Field Name="EmployeeName">i:0#.f|membership|[email protected]</Field>
    <Field Name="EmployeeName">i:0#.f|membership|[email protected]</Field>
    <Field Name="EmployeeName">0#.f|membership|[email protected]</Field>
    <Field Name="EmployeeName">#.f|membership|[email protected]</Field>
    <Field Name="EmployeeName">[email protected]</Field> -->
    <Field Name="EmployeeName">[email protected]</Field>
    <Field Name="Achievements">Rock Star</Field>
    <Field Name="Achieve_x005f_Des">Cras congue varius metus, in tincidunt metus Vestibulum vel turpis nec leo porttitor pulvinar fringilla ut lacus. a dictum aliquam. Pellentesque non felis cursus, lobortis, mattis arcu. Duis molestie nisi quis lectus tincidunt, a porttitor turpis iaculis. Donec condimentum, tellus sit amet hendrerit aliquet, est eros faucibus nulla, eu ultricies ligula ante id quam. Suspendisse suscipit orci sit amet vestibulum ultrices. Nunc dictum tortor non magna volutpat</Field>
    </Row>
    </Rows>
    </Data>
    </ListInstance>

    Ok I figured it out. You need to you use the users ID.
    <Field Name="EmployeeName">15</Field>

  • Add Item using REST and populate People field (SharePoint 2010)

    I am trying to add an item to a list that has a People type field using REST API.  For some reason, I am getting 400 (Bad Request) error.  Can anyone show me how to add a list item and populate the user field?
    Here's the code snippet I am using -
    var url = 'https://mytestsite/_vti_bin/listdata.svc/mylist';
    var item = {};
    item.Title = 'my REST item';
    item.User = 'contoso\user1';
    var jsonObj = Sys.Serialization.JavaScriptSerializer.serialize(item);
    $.ajax({
             type: 'POST',
             url: url,
             contentType: 'application/json',
             processData: false,
             data: jsonObj,
             success: function ()
               console.log('item updated');
    Thanks!

    Hi,
    To update the People field, we will need to make a reference to the user information list.
    Here are two links will provide more information:
    http://sharepoint.stackexchange.com/questions/65650/rest-api-update-a-muli-value-user-field
    http://charliedigital.com/2011/04/23/updating-user-fields-via-listdata-svc/
    You can view the User Information list in this way:
    http://zimmergren.net/technical/sharepoints-hidden-user-list-user-information-list
    Best regards
    Patrick Liang
    TechNet Community Support

  • On iprocurement page..How to populate task field dependent on Project lov field value which Project type is "Capital Project Type"

    Hi,
    I have an requirement on Iprocurement page where in i have to populate task field as CAPL in case my project field contains the project which is of type 'Capital Project Type'.
    Please suggest how can we implement this.
    Thanks,
    Abhishek

    try these links:
    http://sharepoint.stackexchange.com/questions/103682/autopopulate-form-fields-based-on-selection-in-people-picker-column-using-javasc
    http://sharepoint.stackexchange.com/questions/80261/people-picker-not-getting-populated-in-the-sharepoint-site
    http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx

  • How to populate text fields with data present in a table

    Hi,
    The page i'm building has got a select list for the primary key column and text fields corresponding to rest of the columns in the table.
    upon selecting some value from the list, the data corresponding to that row should get populated in the respective items. I don't want to add source in each item. can't i create a process or something else where this is done for each item.
    for eg there's a table with columns A(primary key) and B.
    there is a text fields on this page.
    this textfield should populate the data from the table whenever i submit the page such that teh value in B is select B from tablename where A = the selected value.
    Thanks
    Dhirendra

    So I assume page was not built using a wizard. Why on earth you would want to I dont know, but you could create an "After Header" pl/sql process to populate the relevant fields, assuming the id was know on entry to the page. If you want to select the id on the page and then populate the fields, guess you will need to use a "Text Field (always submits page when Enter pressed)" and then use an "On Submit" process to populate the items.
    If you are using an Automated Row Fetch, remember to select "Set memory Cache on Fetch" in that process.
    Hope this helps.

  • How do I click a key and have Firefox populate a field I am in with specified text?

    I provide online assistance for a specific group of clients. I am finding myself repeatedly writing almost the exact same paragraphs. Which Add-on would allow me to simply populate a field on a page with the exact text -- I'm hoping to set up 20 or 30 responses that I can just select instead of having to retype everything. Thanks for any guidance.

    Nailed it cor-el!!!!! I am so delighted! It's exactly what I've been looking for. I gave you a SOLVED with pleasure.

  • Using an event in table maintenance view to populate a field

    I have a table maintenance view, and I would like to populate one field of the table with derived data. I am trying to do this by coding a routine for one of the events, but so far no luck. I have been able to chege the data in the TOTAL table, but still it does not populate the field on the screen.
    Note this is not for one row as it is entered, but I want all rows of the table displayed to show this field with derived data.
    So the question is: what is the correct event to use, and what is the correct internal table to update? Can I make changes to EXTRACT or TOTAL to do this?
    Kind Regards,
    Tony.

    Hi Rob,
    Sorry for being lazy; I'll close this and off and search :-}
    BR,
    Tony.

  • In Sales Order form populate charges field after saving the Sales Order

    Can we populate Charges field in Sales Order form after saving the sales Order automatically.
    The charges to be calculated based on the amount entered and the item selected in Sales Order.
    In the Manual process it is done by hitting the Actions Button and then select the Charges.
    The charge type would be "Freight Costs"

    by using process_order API, I am able to update the charges field.

  • How to populate the field Discount Percent (DIS) in the outbound S1ORDEXC?

    Hello all,
    I am working with the Spec2000 to send out the IDOC S1ORDEXC.
    Does anyone know how to populate the field Discount Percent (DIS)?
    This field length of Discount Percent is 2 characters, but our customer discount in the Princing Conditions (Sales Order) is longer than 2 characters (ex:  7.500-%)
    Thank you

    Hello Thuan
    I guess you are working with IS- ADEC and SPEC 2000. I am not an expert on this but leave you some hints from OSS notes I came across.
    It appears like Discount Percent - DIS and Procurement Discount Percent -PDP are complementary and mutually exclusive. If one exists, the other need not.
    Looks like DIS is computed as (100-PDP)/100 and it is just a 2- integer data (as in 20 Percent). It is a kind of multiplier (Factor), example if  PDP discount is 10 percent, then DIS (Factor) is 0.9 and so  final (net) price after discount = Price*0.9.
    " If the discount comes in the S1BOOKED inbound into SD in the field DIS, then the discount has to be sent back in the DIS field .. if it came in the PDP field then it has to be sent back in the PDP field. If there was no discount in the incoming IDoc, then the discount has to be filled in the PDP if there was a change in the discount".
    KDATE in SPEC 2000 file maps to DIS and KPERC to PDP.
    PDP has 4 characters and per OSS note 440380, the point is ignored meaning you can work with 1225 instead of 12.25.
    So may be you can work with PDP?
    OSS notes: Apply to older releases but may still be applicable conceptually speaking.
    456153 - S1ORDEXC does not send out Discount
    440380 - PDP has only 4 characters in the SPEC IDoc instead of 5
    596042 - Discount percent DIS not considered e processing S1ORDEXC
    698668 - Incorrect calculation of unit price for PO item by S1ORDEXC
    Let me know you final findings.

  • How to populate custom fields for Outbound delivery header (LIKP)

    Hi All,
    I have added one field in the structure LIKP using APPEND structure. Now want to populate this field from a batch program. I have delivery number. Is there any API or BAPI. I already tried using the FM BAPI_OUTB_DELIVERY_CHANGE by populating the extension. Is there any another area (EXIT or BADI) where I need to change.
    Thanks in advance
    Subhankar

    Hi Keshav,
    No . Nothing was happend.
    l_wa_header_data-deliv_numb = '8600007138' .
    l_wa_header_control-deliv_numb = '8600007138'.
    l_wa_extension1 = 'X'.
    append l_wa_extension1 to i_extn1.
    l_delivery = '8600007138'.
    call function 'BAPI_OUTB_DELIVERY_CHANGE'
      exporting
        header_data    = l_wa_header_data
        header_control = l_wa_header_control
        delivery       = l_delivery
      tables
        extension1     = i_extn1
        return         = l_i_return1.
    After processing l_i_return1 is coming as blank.
    Thanks
    Subhankar

  • How to populate the field VTTK - EXTI1 in the shipment

    Hi there,
    I have a situation where I need to populate the field VTTK - EXTI1  with certain values, I would like to know if there is a user exit or badi to do this.  Actually the field is empty and it's possible to enter any value.
    Thanks in advance
    Regards

    I have found in the screen of shipments a program where the logic of PBO PAI could be changed.
    INCLUDE mv56aozz.                      " User-modules PBO
    INCLUDE mv56aizz.                      " User-modules PAI
    However in the field vttk-exti1 I don't know how can I asociate a custom match code to this field using Abap code.
    Any help will be appreciate.
    Thanks in advance.
    Alexis

  • How to populate this fields in ce_bank_accounts?

    Hey there, first, i want to apologize for my bad english.
    i'm working with Cash management and i'm using this API ce_bank_pub because the bank are internals. i have the load from banks and branch, and kinda the bank accounts, but i can´t find how to populate this fields, that are mandatory for my requeriment:
    AUTORECON_AP_MATCHING_ORDER
    AUTORECON_AR_MATCHING_ORDER  
    RECON_ENABLE_OI_FLAG
    RECON_OI_FLOAT_STATUS
    RECON_OI_CLEARED_STATUS
    RECON_OI_MATCHING_CODE
    AUTORECON_AP_MATCHING_ORDER2
    this is my "flow of work", first, i load the data with SQL*Loader in a custom/personal table, after this, i have a cursor that select all the records of this table and do some validations, after this (and if all the records are ok) i use the API ce_bank_pub.
    i don't know if that API support those fields, I've read the documentation but can not find what I require.
    any help will be appreciate.
    thanks a lot.
    [SPANISH]
    Estoy trabajando con una carga de bancos, sucursales, cuentas bancarias y usos de cuentas, hasta ahorita todo bien, solo tengo problemas al poblar los campos que se muestran en la parte de arriba en la tabla ce_bank_accounts, estoy utilizando el API ce_bank_pub ya que los bancos son internos.
    mi procedimiento, o la manera que lo hago es ésta:
    cargo los datos con SQL*Loader a una tabla intermedia/temporal por decirlo así, posteriormente un cursor selecciona los datos para realizar las validaciones y las reglas de negocio y si los datos son correctos utilizo el API, eso es en general para las 4 cosas, pero los campos de arriba no se como cargarlo, modificarlos o si hay alguna otra manera para agregarselos.
    cualquier ayuda es apreciada.
    Muchas gracias.

    Hi Miguel,
    hope this helps ...
    AUTORECON_AP_MATCHING_ORDER - Order of matching statement lines to AP transactions, by transactions first or by batch first, lookup type BATCH_OR_TRX
    AUTORECON_AR_MATCHING_ORDER - Order of matching statement lines to AR transactions, by transactions first or by batch first, lookup type BATCH_OR_TRX
    AUTORECON_AP_MATCHING_ORDER2 - Order of matching statement lines to AP transactions, by transactions first or by batch first, lookup type BATCH_OR_TRX_OR_GROUP
    For all the above three fields, navigate to Lookups from Cash Management responsibility and find the lookup type BATCH_OR_TRX, this will have 3 values, B for Batch, G for Group and T for Transaction ..... pass any one of the three value as per your requirement ..
    RECON_OI_MATCHING_CODE - Open interface transactions matching code, T for matching by transaction number, D for matching by date and amount. Lookup type: OI_MATCHING_CRITERIA
    For the above field, navigate to Lookups from Cash Management responsibility and find the lookup type OI_MATCHING_CRITERIA, this will have 2 values D for Date and Amount, T for Transaction Number .... Pass any one of the two values as per your requirement ...
    RECON_ENABLE_OI_FLAG -  Flag to indicate whether to allow reconciliation of statement lines to open interface transactions, Y or N
    As per your requirement indicate Y or N ....
    RECON_OI_FLOAT_STATUS - Code to specify the float status for open interface transactions
    RECON_OI_CLEARED_STATUS  - Code to specify cleared status for open interface transactions
    I am not sure about the above two ...i.e. the values that needs to be passed ...
    Regards,
    Ivruksha

  • How to populate a field in a standard SAP screen through FMs and Workflows

    Hello Everyone,
    I have a requirement in which I have to populate a field in an standard SAP Screen.The logic for finding the value of the this field will be done in a new FM and this value has to be passed to this field on the standard SAP screen through workflow.I am new to workflows and need some quick help.Kindly let me know the basic steps I need to follow to realise this requirement.
    Thanks,
    VP

    Hi,
    You can create the task in the workflow which contains the method in which you set the value of the field in standard screen using set parameters id and the aprameter name attach to the field

  • Auto populate text fields with a trigger such as entering text into input fields in ADF

    Hello all,
    I am not able to auto populate text fields with a trigger such as entering text into input fields in ADF.
    I tried AdfFacesContext.getCurrentInstance().addPartialTarget(val); in the back end using setter method of input text field.
    its not working ..
    is there any way to achieve it
    Regards,
    Shakir

    Hi,
    Always mention your JDev version.
    The valueChangeListener would fire only when you set the autoSubmit property of the field to true. Can you elaborate your requirement? What do you mean by related data? Are you performing some sort of search?
    If you want to get the value you entered on the field, just set autoSubmit to true and get the new value from the valueChangeListener. If your requirement is something like as and when you type, do something, you need to check out this approach :https://blogs.oracle.com/groundside/entry/auto_reduce_search_sample
    -Arun

Maybe you are looking for

  • CPU Related Report From Statspack

    Hello, I am looking for a statspack query that will produce a report regarding CPU (usage, parses etc.). It has to calculate the average of each day, in order to use the values in excel and build a trend analysis report. An example a similar report I

  • Will not export all images to folder

    We are having a problem with LR not exporting all of the images when saving to a folder. It errors on some images and will not save them. All of the images are available and LR will export a web photo gallery with all of the images without any proble

  • Run Time error : ITS_EXPRESSION_NOT_NUM

    Dear Freinds,            When iam changing the Html templates  IAC  applicaion iam getting run time error as : ITS_EXPRESSION_NOT_NUM Please find the dump analysis. Runtime Errors         ITS_EXPRESSION_NOT_NUM Date and Time          04.01.2011 18:21

  • Reports that track user actions in DMS

    Hi- Does anyone know if there are reports that would provide information about who has viewed, checked-out, check-in and copy (Shift+F7) documents in the content server?  Thanks for your assistance, in advance!  (And I reward points!) -J

  • Adobe AIR 14.0.0.110 for iOS on iOS 8 beta 2 - Game Center not authenticating in the Game Center ANE of the Gaming SDK?

    I included the iOS 8 beta sdk and I have an app that is using the adobe gaming sdk's Game Center ANE, but Game Center isn't authenticating when I test the app. Is this a bug? Will it be fixed? I don't have two iOS 7 devices and I can't downgrade to i