How to cancel the newly created record

Hi,
I have created a record in a table, but i want to cancel that record before pressing the apply button.
How to do this like "Clear Record' in oracle forms?
Thanks in advance,
SAN

Hi,
Use below code to delete a record in Advance table...
AM:
public void Delete(String dseqnum)
Number dsequm;
int fetchedrowcount;
int dseqnumtodelete;
RowSetIterator deleteIter;
OADBTransaction tr = getOADBTransaction();
DisconutVOImpl dvo = getDisconutVO1();
DisconutVORowImpl row=null;
dseqnumtodelete=Integer.parseInt(dseqnum);
fetchedrowcount=dvo .getRowCount();
deleteIter = dvo .createRowSetIterator("deleteIter");
deleteIter.setRangeStart(0);
deleteIter.setRangeSize(fetchedrowcount);
for(int i=0;i<fetchedrowcount;i++)
row= (DisconutVORowImpl)deleteIter.getRowAtRangeIndex(i);
dsequm=(Number)row.getAttribute("SequenceNumber");
if(dsequm.compareTo(dseqnumtodelete)==0)
row.remove();
break;
deleteIter.closeRowSetIterator();
Call above method in co on delete action:
CO:
if("Delete".equals(pageContext.getParameter(EVENT_PARAM)))
String delete_mpid=pageContext.getParameter("MPeriodid");
AM.Delete(pageContext, webBean,delete_mpid);
Note:Set below properties for Delete button..
Disable Server validation:*TRUE*
Disable Client validation:*TRUE*
Regards
Meher Irk

Similar Messages

  • How to get the Newly Created Material

    Hi all,
    Iam creating Materials using BDC sessions method,My Problem is to update the Newly Created Material in a Ztable.
    so iam getting the Newly created Matnr by the following peice of code
        SELECT  matnr FROM mara INTO  TABLE v_matnr
                               WHERE ersda = sy-datum
                               ORDER BY matnr DESCENDING.
    But the thing is,we are getting Previously created material.i.e the new material will be  created only after the sessions are processed,but when i write the above code in the program we are getting previous material.
    so how to update the newly created material.
    I think we can't do  that through program because we can get new material only after processing the session..so what is the solution for this.should we use userexits for getting the newly created material.
    thanks in advance
    balaji

    Hello,
    Use the <b>BAPI_MATERIAL_SAVEDATA</b> to create the materials.
    The BAPI will return the Material number which is created at that instance by which u can update the ZTABLE.
    Vasanth

  • How to cause a form to reload with a newly created record?

    I hope this is easy and I'm just missing it.
    I have a form based on a table (a "parent" table.). The parent table uses a trigger to generate the PK.
    When a new parent record is created with the form, I want the page to reload with the newly created record still in the form. Then some conditional regions based upon child-tables would appear, with options to populate the detail records.
    My problem is simple: how can I access the value of the primary key of the newly created record once it is submitted to the database, so I can use it to reload that record into the form?
    Thanks very much for your help!

    John - The DML process (Automatic Row Processing) has a Return Key Into Item option. That's what you need.
    Scott

  • How to assign project specific task with the newly created projects ?

    Hi All,
    I need help. I need to assign project specific tasks (which i will be taking from staging table) other than the default task which are assigned during project creation. How do I proceed with this within same package. I am attaching the code of my package below...
    CREATE OR REPLACE PACKAGE body xxpa_proj_conv_pkg as
    PROCEDURE xxpa_create_project_proc(O_ERRBUF OUT VARCHAR2,O_RETCODE OUT VARCHAR2)
    is
    variables need to derive global parameters
    v_responsibility_id NUMBER; --- PA Supervisor responsibility id
    v_user_id NUMBER;
    deriving global parameters-
    -- Variables needed for API standard parameters
    v_api_version_number NUMBER := 1.0;
    v_commit VARCHAR2(1) := 'F';
    v_return_status VARCHAR2(1);
    v_init_msg_list VARCHAR2(1) := 'F';
    v_msg_count NUMBER;
    v_msg_index_out NUMBER;
    v_msg_data VARCHAR2(2000);
    v_data VARCHAR2(2000);
    v_workflow_started VARCHAR2(1) := 'Y';
    v_pm_product_code VARCHAR2(10);
    ---variables for catching errors---
    v_error_flag number:=0;
    -- Predefined Composite data types
    v_project_in PA_PROJECT_PUB.PROJECT_IN_REC_TYPE;
    v_project_out PA_PROJECT_PUB.PROJECT_OUT_REC_TYPE;
    v_key_members PA_PROJECT_PUB.PROJECT_ROLE_TBL_TYPE;
    v_class_categories PA_PROJECT_PUB.CLASS_CATEGORY_TBL_TYPE;
    v_tasks_in_rec PA_PROJECT_PUB.TASK_IN_REC_TYPE;
    v_tasks_in PA_PROJECT_PUB.TASK_IN_TBL_TYPE;
    v_tasks_out_rec PA_PROJECT_PUB.TASK_OUT_REC_TYPE;
    v_tasks_out PA_PROJECT_PUB.TASK_OUT_TBL_TYPE;
    v_CREATED_FROM_PROJECT_ID varchar2(20);
    v_CARRYING_OUT_ORGANIZATION_ID varchar2(20);
    v_person_id NUMBER;
    v_project_role_type VARCHAR2(20);
    API_ERROR EXCEPTION;
    v_a NUMBER;
    cursor for project in data
    CURSOR cur_project_in_data IS SELECT * FROM XXPA_PROJECT_IN_STG;
    cursor for task data
    CURSOR cur_task_in_data IS SELECT * FROM XXPA_TASK_IN_STG;
    ------------------------Cursors used for validations----------------------------------
    cursor for product code used for validation
    cursor cprc is select distinct PROJECT_RELATIONSHIP_CODE from PA_PROJECT_CUSTOMERS;
    cursor for distribution rule-
    cursor cdr is select DISTRIBUTION_RULE from PA_DISTRIBUTION_RULES;
    cursor for project status code
    cursor cpsc is SELECT PROJECT_STATUS_CODE, PROJECT_STATUS_NAME FROM PA_PROJECT_STATUSES WHERE STATUS_TYPE = 'PROJECT';
    cursor for template/created from project id
    cursor ccpid is select project_id from pa_projects where template_flag='Y';
    BEGIN
    select user_id, responsibility_id into v_user_id, v_responsibility_id
    from PA_USER_RESP_V
    where user_name like 'amit_kumar%'
    and responsibility_name like'PA SupervisorS';
    -- --Fnd_global.apps_initialize(user_id,resp_id, resp_appl_id);
    -- Fnd_global.apps_initialize(v_user_id,v_responsibility_id,275);
    -- -------calling global parameters---
    pa_interface_utils_pub.set_global_info
    p_api_version_number =>v_api_version_number,
    p_responsibility_id =>v_responsibility_id,
    p_user_id =>v_user_id,
    p_msg_count =>v_msg_count,
    p_msg_data =>v_msg_data,
    p_return_status =>v_return_status
    dbms_output.put_line ('Set Global status ->' || v_return_status);
    ----Cursor for PRODUCT RELATED DATA-----------
    FOR REC IN cur_project_in_data LOOP
    -----PASSING VALUES TO THE COMPOSITE DATA TYPE(PROJECT_IN_REC_TYPE)-------
    ----retrieving product code-----
    select lookup_code into v_pm_product_code
    from pa_lookups
    where lookup_type = 'PM_PRODUCT_CODE'
    and meaning = 'Oracle Project Manufacturing';
    -----retrieving and validating created from project id----
    BEGIN
    select project_id
    into v_CREATED_FROM_PROJECT_ID
    from pa_projects_all
    where name=rec.created_from_project_name;
    EXCEPTION
    when others then
    O_Retcode := '1';
    O_Errbuf :='Incorrent CREATED_FROM_PROJECT_NAME';
    Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
    UPDATE XXPA.XXPA_PROJECT_IN_STG
    SET ERROR_FLAG ='1' ,last_updation_date='sysdate' where created_from_project_name = rec.CREATED_FROM_PROJECT_NAME;
    END;
    -----retrieving & validating carrying out organization id-----
    BEGIN
    select distinct(CARRYING_OUT_ORGANIZATION_ID)
    into v_CARRYING_OUT_ORGANIZATION_ID
    from pa_projects_prm_v
    where CARRYING_OUT_ORGANIZATION_NAME=rec.carrying_out_organization_name;
    EXCEPTION
    when others then
    O_Retcode := '1';
    O_Errbuf :='Incorrent Carrying Out Organization name';
    Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
    UPDATE XXPA.XXPA_PROJECT_IN_STG
    SET ERROR_FLAG ='1' ,last_updation_date='sysdate' where carrying_out_organization_name = rec.carrying_out_organization_name;
    END ;
    v_project_in.pm_project_reference := rec.segment1;
    v_project_in.project_name := rec.PROJECT_NAME;
    v_project_in.created_from_project_id := v_CREATED_FROM_PROJECT_ID;
    v_project_in.carrying_out_organization_id := v_CARRYING_OUT_ORGANIZATION_ID;
    v_project_in.project_status_code := rec.PROJECT_STATUS_CODE;
    v_project_in.description := rec.PROJECT_DESCRIPTION;
    v_project_in.start_date := rec.PROJECT_START_DATE;
    v_project_in.completion_date := rec.PROJECT_COMPLETION_DATE;
    v_project_in.distribution_rule := rec.DISTRIBUTION_RULE;
    v_project_in.project_relationship_code := rec.PROJECT_RELATIONSHIP_CODE;
    -------------------------Validation of incoming project data--------------------------------
    v_error_flag := 1;
    project relationship code validation
    BEGIN
    for prc in cprc
    loop
    if (rec.PROJECT_RELATIONSHIP_CODE=prc.PROJECT_RELATIONSHIP_CODE) or (rec.PROJECT_RELATIONSHIP_CODE is null)--can be overridden from template
    then
    v_error_flag :=0;
    else null;
    end if;
    end loop;
    END;
    project distribution rule validation
    BEGIN
    for dr in cdr
    loop
    if (rec.DISTRIBUTION_RULE=dr.DISTRIBUTION_RULE) or (rec.DISTRIBUTION_RULE is null) null since the value can be taken from template too
    then
    v_error_flag :=0;
    else null;
    end if;
    end loop;
    END;
    project status code validation
    BEGIN
    for sc in cpsc
    loop
    if (rec.PROJECT_STATUS_CODE=sc.PROJECT_STATUS_CODE) or (rec.PROJECT_STATUS_CODE is null) null since the value can be taken from template too
    then
    v_error_flag :=0;
    else null;
    end if;
    end loop;
    END;
    dbms_output.put_line ('Error at PROJECT_STATUS_CODE>' ||v_error_flag);
    validation logic for project start date
    BEGIN
    if TRUNC(rec.PROJECT_START_DATE) >= TRUNC(rec.PROJECT_COMPLETION_DATE)
    THEN
    v_error_flag := 1;
    O_Retcode := '1';
    O_Errbuf :='Project start date cannnot be greater than completion date';
    Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
    END IF;
    END;
    validation logic for project completion date
    BEGIN
    if (TRUNC(rec.PROJECT_COMPLETION_DATE)<=TRUNC(rec.PROJECT_START_DATE))
    then
    if ( rec.PROJECT_STATUS_CODE='CLOSED' and rec.PROJECT_COMPLETION_DATE>sysdate)
    THEN
    v_error_flag := 1;
    O_Retcode := '1';
    O_Errbuf :='completion date cannot be greater than sysdate for closed projects';
    Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
    END IF;
    v_error_flag := 1;
    O_Retcode := '1';
    O_Errbuf :='Project closed date cannot be less than start date';
    end if;
    END;
    --------Update staging table for the error records--------
    BEGIN
    if v_error_flag =1
    then
    O_Retcode := '1';
    O_Errbuf :='Incorrect project relationship code';
    Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
    UPDATE XXPA.XXPA_PROJECT_IN_STG
    SET ERROR_FLAG ='1' ,last_updation_date='sysdate' where PROJECT_RELATIONSHIP_CODE = rec.PROJECT_RELATIONSHIP_CODE;
    end if;
    END;
    -----------------------End of validation of incoming project data----------------------------------
    ---------------Project Task DATA-----------------
    v_a:=0;
    FOR tsk IN cur_task_in_data LOOP
    v_tasks_in_rec.pm_task_reference :=tsk.task_reference ;
    v_tasks_in_rec.task_name :=tsk.task_name;
    v_tasks_in_rec.pm_parent_task_reference :=tsk.parent_task_reference ;
    v_tasks_in_rec.task_start_date :=tsk.task_start_date ;
    v_tasks_in_rec.task_completion_date :=tsk.task_completion_date ;
    v_tasks_in(v_a) := v_tasks_in_rec;
    v_a:=v_a+1;
    end loop;
    ---------------end of task details------------------
    --INIT_CREATE_PROJECT
    pa_project_pub.init_project;
    ---------------------CREATE_PROJECT--------------------------
    pa_project_pub.create_project(
    p_api_version_number=> v_api_version_number,
    p_commit => v_commit,
    p_init_msg_list => v_init_msg_list,
    p_msg_count => v_msg_count,
    p_msg_data => v_msg_data,
    p_return_status => v_return_status,
    p_workflow_started => v_workflow_started,
    p_pm_product_code => v_pm_product_code,
    p_project_in => v_project_in,
    p_project_out => v_project_out,
    p_key_members => v_key_members,
    p_class_categories => v_class_categories,
    p_tasks_in => v_tasks_in,
    p_tasks_out => v_tasks_out);
    if v_return_status = 'S'
    then
    UPDATE XXPA.XXPA_PROJECT_IN_STG
    SET INTERFACE_STATUS ='Success' where segment1 = v_project_out.pa_project_number; ---P->pending & S-> Success
    dbms_output.put_line('New Project Id: ' || v_project_out.pa_project_id);
    dbms_output.put_line('New Project Number: ' || v_project_out.pa_project_number);
    else
    UPDATE XXPA.XXPA_PROJECT_IN_STG
    SET INTERFACE_STATUS ='Pending' where segment1 = v_project_out.pa_project_number;
    raise API_ERROR;
    end if;
    END LOOP;
    Commit;
    ------Handling Exception--------
    EXCEPTION
    WHEN api_error THEN
    dbms_output.put_line('An error occured during project creation');
    IF (v_msg_count > 0 ) THEN
    FOR i IN 1..v_msg_count LOOP
    apps.PA_INTERFACE_UTILS_PUB.get_messages(
    p_msg_count => v_msg_count,
    p_encoded => 'F',
    p_msg_index => i,
    p_msg_data => v_msg_data,
    p_data => v_data,
    p_msg_index_out => v_msg_index_out);
    dbms_output.put_line('Error message v_data ->'||v_data);
    dbms_output.put_line('Error message v_msg_data ->'||v_msg_data);
    dbms_output.put_line('Error message v_msg_index_out ->'||v_msg_index_out);
    dbms_output.put_line('Error message p_msg_index ->'||i);
    APPS.fnd_file.put_line(APPS.FND_FILE.LOG,v_data);
    END LOOP;
    END IF;
    WHEN OTHERS THEN
    dbms_output.put_line('An error occured during conversion, SQLCODE ->'|| SQLERRM);
    IF (v_msg_count >=1 ) THEN
    FOR i IN 1..v_msg_count LOOP
    PA_INTERFACE_UTILS_PUB.get_messages(
    p_msg_count => v_msg_count,
    p_msg_index => i,
    p_encoded => 'F',
    p_msg_data => v_msg_data,
    p_data => v_data,
    p_msg_index_out => v_msg_index_out);
    dbms_output.put_line('Error message ->'||v_data);
    APPS.fnd_file.put_line(APPS.FND_FILE.LOG,v_data);
    END LOOP;
    END IF;
    end; --end procedure
    END xxpa_proj_conv_pkg;
    * Please tell me how to assign project specific task with the newly created projects??? *
    Also please tell me how to assign multiple * Project_Relationship_Code * (ex: END CLIENT, GENERAL CONTRACTOR, PRIMARY) for a particular project during project creation?

    Are you not storing the project number in the staging table designed for storing the task data? You can use create_project API to create the project and tasks at the same time with one single call. You may want to try that option

  • How to read value from Key flexfield added on to the newly created SIT

    Hi Experts,
    I have a requirrment to display a new structure in the Special Information Types (SIT) screen in SSHR. The data entered into the segment needs to be validated using PL/SQL function.
    I have performed below steps to display the structure/field on SIT Page
    1. Created new flexfield structure as XX_LEAVE_ENCASHMENT under the "HUMAN RESOURCE" Application (Application id- 800) and flexfield TITLE "Personal Analysis Flexfield" (PEA).
    2. Added a new segment "Encash Days" for the newly created flexfiled structure "XX_LEAVE_ENCASHMENT".
    3. Added this new structure in the Special Information Types form in HRMS responsibility
    4. The structure is enabled on the SIT screen.
    Now I want to validate the data entered in Encash Days field in this page by calling a PL/SQL function. This can be done by extending the SIT page Controller.
    But how should the ID of the newly enabled segment (in the new Flexfield strucuture) be retrieved in the controller inorder to read the user-entered value (to further call the validation program)? Or is there any other way of achieving this functionality in OAF?
    Please help.
    Thanks.

    Hi,
    Yes, u can get the value from the SIT and perform the relevant validation too.
    Refer http://apps2fusion.com/at/43-ss/453-oaf-extension-case-study
    Regards,
    Gyan

  • RSRV not showing number of record for the newly created cubes

    In RSRV Elementary tests i execute database information for a newly created cube.It is executed fine and it is showing the no of dimensions and line item dimensions but it is not showing the diff tables E,F.... I tried refreshing the statistics of this cube in the manage and did check statistics aswell.But it is still the same.and I tried in the program SAP_INFOCUBE_DESIGNS  it is showing for all the cubes except for the newly created once.
    Is there any settings as such.
    Let me know ASAP

    Hi Ninad,
    Use the program SAP_INFOCUBE_DESIGNS and get the cube size in bytes.
    Transaction se16 -> fact table name, /bic/f[infocube name] and /bic/e[infocube name] or /bi0/f.. and /bi0/e for business content infocube, click 'number of entries' - This is for no. of records.
    Transaction DB02 -> 'detail analysis' -> object name = [infocube name]
    Function Module - RSDU_INFOCUBE_TABLE_SIZES_INF
    Bye
    Dinesh

  • How to find the number of records per months  in cube

    Hi,
      how to find the number of records per months for my all cubes?
      Can i use the ListCube transaction to find totl number f records per cube monthwise ?
    Jimmy

    Hi,
    Here is a program to generate no of records and list of ODS and Cubes in Active version.Schedule this program in background and create a cube to load this information and schedule to the data from the file generated by the program. Schedule this all per you requirement.
    1.Copy the code into your Z<programname> from Se38.
    2.change the FILENAME in CALL FUNCTION 'GUI_DOWNLOAD' in the program to the location from where you can pick the information to load data to cube(eg Application server).
    3.Save program.
    4.Schedule the program in background as required
    5.Create cube with infoobjects to hold no of records and Infoprovider name
    6.Load this cube based on event after the program job is done.
    Hence you can report on this cube to see no of records in  CUBE or ODS in your box.
    Please find the code below.
    Cheers,
    Kavitha Kamesh.
    types: begin of itabs ,
          tabname type dd02l-tabname,
          end of itabs.
    data: itab type itabs occurs 0 with header line.
    data: counter type i.
    data: begin of itab1 occurs 0,
    tabname type dd02l-tabname,
    counter type i,
    end of itab1.
    DATA: ITABTABNAME TYPE STRING.
    DATA: LENGTH TYPE I.
    DATA: OBJECT(30).
    data: str(6) type c.
    select  tabname from dd02l into table itab where ( tabname LIKE  '/BIC/F%' or tabname LIKE  '/BIC/A%00' )
    and TABCLASS = 'TRANSP' and AS4LOCAL = 'A'.
    loop at itab.
      select count(*) from (itab-tabname) into counter.
      str = itab-tabname.
      if str = '/BIC/F'.
    LENGTH  = STRLEN( ITAB-TABNAME ).
      SHIFT  itab-tabname BY 6 PLACES LEFT.
    ELSEIf  str = '/BIC/A'.
      SHIFT  itab-tabname BY 6 PLACES LEFT.
      LENGTH  = STRLEN( ITAB-TABNAME ).
    LENGTH = LENGTH - 2.
    endif.
      itab1-tabname = itab-tabname(LENGTH).
      append itab1.
      itab1-counter = counter.
      clear itab-tabname.
      clear:  COUNTER.
    endloop.
    *********** itab1
    loop at itab1.
    write:/ itab1-tabname, itab1-counter.
    endloop.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                    =
        FILENAME                        = 'c:records.xls'
        FILETYPE                        = 'ASC'
    *   APPEND                          = ' '
        WRITE_FIELD_SEPARATOR           = ','
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    * IMPORTING
    *   FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab1
    *   FIELDNAMES                      =
    * EXCEPTIONS
    *   FILE_WRITE_ERROR                = 1
    *   NO_BATCH                        = 2
    *   GUI_REFUSE_FILETRANSFER         = 3
    *   INVALID_TYPE                    = 4
    *   NO_AUTHORITY                    = 5
    *   UNKNOWN_ERROR                   = 6
    *   HEADER_NOT_ALLOWED              = 7
    *   SEPARATOR_NOT_ALLOWED           = 8
    *   FILESIZE_NOT_ALLOWED            = 9
    *   HEADER_TOO_LONG                 = 10
    *   DP_ERROR_CREATE                 = 11
    *   DP_ERROR_SEND                   = 12
    *   DP_ERROR_WRITE                  = 13
    *   UNKNOWN_DP_ERROR                = 14
    *   ACCESS_DENIED                   = 15
    *   DP_OUT_OF_MEMORY                = 16
    *   DISK_FULL                       = 17
    *   DP_TIMEOUT                      = 18
    *   FILE_NOT_FOUND                  = 19
    *   DATAPROVIDER_EXCEPTION          = 20
    *   CONTROL_FLUSH_ERROR             = 21
    *   OTHERS                          = 22
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • How to cancel the event in Item Adding and display javascript message and prevent the page from redirecting to the SharePoint Error Page?

    How to cancel the event in Item Adding without going to the SharePoint Error Page?
    Prevent duplicate item in a SharePoint List
    The following Event Handler code will prevent users from creating duplicate value in "Title" field.
    ItemAdding Event Handler
    public override void ItemAdding(SPItemEventProperties properties)
    base.ItemAdding(properties);
    if (properties.ListTitle.Equals("My List"))
    try
    using(SPSite thisSite = new SPSite(properties.WebUrl))
    SPWeb thisWeb = thisSite.OpenWeb();
    SPList list = thisWeb.Lists[properties.ListId];
    SPQuery query = new SPQuery();
    query.Query = @"<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>" + properties.AfterProperties["Title"] + "</Value></Eq></Where>";
    SPListItemCollection listItem = list.GetItems(query);
    if (listItem.Count > 0)
    properties.Cancel = true;
    properties.ErrorMessage = "Item with this Name already exists. Please create a unique Name.";
    catch (Exception ex)
    PortalLog.LogString("Error occured in event ItemAdding(SPItemEventProperties properties)() @ AAA.BBB.PreventDuplicateItem class. Exception Message:" + ex.Message.ToString());
    throw new SPException("An error occured while processing the My List Feature. Please contact your Portal Administrator");
    Feature.xml
    <?xml version="1.0" encoding="utf-8"?>
    <Feature Id="1c2100ca-bad5-41f5-9707-7bf4edc08383"
    Title="Prevents Duplicate Item"
    Description="Prevents duplicate Name in the "My List" List"
    Version="12.0.0.0"
    Hidden="FALSE"
    Scope="Web"
    DefaultResourceFile="core"
    xmlns="http://schemas.microsoft.com/sharepoint/">
    <ElementManifests>
    <ElementManifest Location="elements.xml"/>
    </ElementManifests>
    </Feature>
    Element.xml
    <?xml version="1.0" encoding="utf-8" ?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Receivers ListTemplateId="100">
    <Receiver>
    <Name>AddingEventHandler</Name>
    <Type>ItemAdding</Type>
    <SequenceNumber>10000</SequenceNumber>
    <Assembly>AAA.BBB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8003cf0cbff32406</Assembly>
    <Class>AAA.BBB.PreventDuplicateItem</Class>
    <Data></Data>
    <Filter></Filter>
    </Receiver>
    </Receivers>
    </Elements>
    Below link explains adding the list events.
    http://www.dotnetspark.com/kb/1369-step-by-step-guide-to-list-events-handling.aspx
    Reference link:
    http://msdn.microsoft.com/en-us/library/ms437502(v=office.12).aspx
    http://msdn.microsoft.com/en-us/library/ff713710(v=office.12).aspx
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

    Recommended way for binding the list event handler to the list instance is through feature receivers.
    You need to create a feature file like the below sample
    <?xmlversion="1.0"encoding="utf-8"?>
    <Feature xmlns="http://schemas.microsoft.com/sharepoint/"
    Id="{20FF80BB-83D9-41bc-8FFA-E589067AF783}"
    Title="Installs MyFeatureReceiver"
    Description="Installs MyFeatureReceiver" Hidden="False" Version="1.0.0.0" Scope="Site"
    ReceiverClass="ClassLibrary1.MyFeatureReceiver"
    ReceiverAssembly="ClassLibrary1, Version=1.0.0.0, Culture=neutral,
    PublicKeyToken=6c5894e55cb0f391">
    </Feature>For registering/binding the list event handler to the list instance, use the below sample codeusing System;
    using Microsoft.SharePoint;
    namespace ClassLibrary1
        public class MyFeatureReceiver: SPFeatureReceiver
            public override void FeatureActivated(SPFeatureReceiverProperties properties)
                SPSite siteCollection = properties.Feature.Parent as SPSite;
                SPWeb site = siteCollection.AllWebs["Docs"];
                SPList list = site.Lists["MyList"];
                SPEventReceiverDefinition rd = list.EventReceivers.Add();
                rd.Name = "My Event Receiver";
                rd.Class = "ClassLibrary1.MyListEventReceiver1";
                rd.Assembly = "ClassLibrary1, Version=1.0.0.0, Culture=neutral,
                    PublicKeyToken=6c5894e55cb0f391";
                rd.Data = "My Event Receiver data";
                rd.Type = SPEventReceiverType.FieldAdding;
                rd.Update();
            public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
                SPSite sitecollection = properties.Feature.Parent as SPSite;
                SPWeb site = sitecollection.AllWebs["Docs"];
                SPList list = site.Lists["MyList"];
                foreach (SPEventReceiverDefinition rd in list.EventReceivers)
                    if (rd.Name == "My Event Receiver")
                        rd.Delete();
            public override void FeatureInstalled(SPFeatureReceiverProperties properties)
            public override void FeatureUninstalling(SPFeatureReceiverProperties properties)
    }Reference link: http://msdn.microsoft.com/en-us/library/ff713710(v=office.12).aspxOther ways of registering the list event handlers to the List instance are through code, stsadm commands and content types.
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

  • How to set the number of records displayed at run time

    Is it possible to set the number of records displayed block property at run time? The built-in 'GET_BLOCK_PROPERTY' can retrieve the number of RECORDS_DISPLAYED. But I can't find SET_BLOCK_PROPERTY to set this property. Is there anyway I can set this property programmatically? Thanks for any suggestions!

    Bookmark Go to End
    goal: How to vary the number of records displayed in a block
    programmatically
    fact: Oracle Forms Developer
    fix:
    Block property 'Number of Records Displayed' can not be changed during runtime
    using SET_BLOCK_PROPERTY. However, it is still possible programmatically change
    the visual appearance of the form so that it creates effect of changing this
    property. To achieve such an effect follow these steps:
    1. in Forms Builder, in the multirecord block define the new set of items.
    The simplest way is to copy/paste the original item and rename created item.
    2. set properties of these new items so that they are the same as the properties
    of the original items. If these new items were copied from original items
    then properties are already the same. Modify following properties
    'Database item' on new items to value 'No'
    'Synchronize with item' to the value of the original item
    'Number of Items Displayed' to desired value.
    'Visible' to 'No'
    In other words, these new items are mirrors of original items.
    3. code event, which is meant to trigger the change in block appearance.
    This code should use SET_ITEM_PROPERTY built-in to set properties
    like 'VISIBLE', 'ENABLED', 'NAVIGABLE', 'UPDATE_ALLOWED' and others
    to desired value for items which are about to be displayed, then
    move cursor to one of these just displayed items with GO_ITEM built-in
    and then hide the previously displayed items.
    Example:
    Assume that the block is built on SCOTT.DEPT schema. Following will
    change the set of displayed items
    set_item_property('dept.mdeptno',visible,property_true);
    set_item_property('dept.mdname',visible,property_true);
    set_item_property('dept.mloc',visible,property_true);
    set_item_property('dept.mdeptno',enabled,property_true);
    set_item_property('dept.mdname',enabled,property_true);
    set_item_property('dept.mloc',enabled,property_true);
    set_item_property('dept.mdeptno',update_allowed,property_true);
    set_item_property('dept.mdname',update_allowed,property_true);
    set_item_property('dept.mloc',update_allowed,property_true);
    set_item_property('dept.mdeptno',navigable,property_true);
    set_item_property('dept.mdname',navigable,property_true);
    set_item_property('dept.mloc',navigable,property_true);
    go_item('dept.mdeptno');
    set_item_property('dept.deptno',visible,property_false);
    set_item_property('dept.dname',visible,property_false);
    set_item_property('dept.loc',visible,property_false);
    Regards,
    Monica

  • How to Apply a Newly Created Access Policy on Existing Users in OIM????????

    How to Apply a Newly Created Access Policy on Existing Users in OIM?
    When the rule is getting failed the user is getting removed from the group but resource is not getting revoked. This is happening only for the old uses..for the users which i created now it working fine..i mean its resource is getting revoked.
    (Retrofit access policy" is checked on the Access Policyand Revoke if not longer applied is checked.)
    For the old users i see the POl_Key is null, for new users i see a value '10'. So i updated the pol_key for old users same as it got generated for new users '10'.
    i even updated the form version too but still revoke doesn't work.
    I cant go for the below approach..
    In order to apply a newly created Access Policy on existing users, one has to make sure that:
    1) "Retrofit access policy" is checked on the Access Policy.
    2) Then run the "Set User Provisioned Date" Schedule task to apply the Access Policy on the existing users in OIM.
    Note: After 9.1.0.1 BP03 the access policy execution has been moved to a new scheduled task "Evaluate User Policies" as mentioned inDocument 839368.1 :How to Use Access Policies to Provision with Groups.
    Is there any other approach i can try.. if you have any idea please reply me asap
    Thanks..

    Thanks for the reply kevin..
    We decided to try the Schedule task (Set User Provisioned Date).
    But i see one problem here after seeing this post in metalik --> Can Access Policies Manage The Life-cycle Of Users Created via Reconciliation? [ID 1136540.1]
    According to this post Access Policies framework does not manage users who are obtained either through trusted reconciliation or target reconciliation.
    Is there any custom way to achieve this??
    How does the access policy framework revoke resource work? (revoke if no longer applies)??
    Edited by: IDMuser19 on Jun 21, 2011 11:43 PM

  • How to know the count of record in CR XI?

    Post Author: Liu ming
    CA Forum: Deployment
    Hi All,
    I create a report by CR XI release 2. The report is viewed in ASP.Net. So, I would like show a message when the report have no record. My question is how to know the count of record?
    Thanks.

    I was able to do this by using
    ora:countNodes('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500')

  • How to cancel the delivery number in the billing due list

    Hi Gurus,
    My User has created the Consignment Fillup order and Dlivery for that order.
    Now User asking that the delivery number coming into Billing Due list (VF04).
    As you know all for Consignment Fillup there is no invoice. Please suggest me
    how to cancel the Delivery number in Billing Due list for above scenario.
    Br,
    Satish

    What you have faced is not at all an issue.  Its a standard behaviour only.  Though you are not generating commercial invoice here, you can generate (F8) proforma via VF04 in bulk.  Either you can generate one proforma per delivery or consolidate multiple deliveries into one proforma which it depends on VTFL copy control for the field Data VBRK/VBRP.   There if you maintain 001 or 007, you can club multiple deveries and if you maintain 003, one proforma per delivery can be created.
    thanks
    G. Lakshmipathi

  • How to get the Newly added fileds from Oracle to BW

    Hi ,
    We have created the view in the DB side and extracted the data to BW side. After that in the DB side they have added new filed. I want to extract the data for that filed also. But that filed is not displaying in the data source itself. We have deleted the sources system assignment to that particular info source and generated the data source in the source system side, and then also I an unable to get the newly added filed in the data source. We are extracting the data from the ORACLE data base. Please let me know the steps how to get the newly added filed in the data source.
    Thanks,
    Visu

    Hi Yadav,
    yes i have alreday created the info objects in the BW side. In the Oracle DB i can see the fileds in the data sources. Newly added filed is not displaying where as previous all fileds are displaying in the oracle DBside.
    Thanks,
    Visu

  • How to cancel the process in initiator of human task in 11g?

    human task as the initiator of the process, by default there is only a SUBMIT button, how to cancel the process then?
    if I just close the form, a task will still created in the task list, still in initiator step. what if I don't want this?
    I tried to add an "CANCEL" output for this , if the output is CANCEL then go to then end activity, but seems it doesn't work. anyone got a better solution? thank you.

    You should be able to use the "Withdraw" action for this - available from the task Actions button/drop down on the human task form.

  • The newly created row cannot be found with another view

    I'm building a JSP client based on BC.
    I have 2 views based on the single entity.
    I'm creating a new row with one view and want to edit the corresponding row with the other view without intermediate commit.
    However, the last view cannot find the new row.
    For the purpose I get the newly created row's key and trying to find the row at the other view by it's RowKey with the tag <jbo:Row>. Now I have an exception:
    oracle.jbo.JboException: Row was not found using request parameter ...
    Can someone give an advice, please?

    Hi,
    I was a little uncertain. I do not have any view associations in this case.
    I've tried to use " .setAssociationConsistent(true)" - dosen't help.
    I've just changed the standard wizard-generated Browse-Edit UIX/JSP form in such way that I'm using one VO for the browse-table jsp, and some other VO for editing jsp. The editing jsp is by itself divided into a number of tabs.
    Every tab of the editing jsp is based on a specific VO and all of the VOs are based on the single Entity Object to the one table.
    While I am editing the existing records in the table everything goes right, but if I create a new row via the browse page and then try to edit it, I have the exception:
    " Row was not found using request parameter: .... " This thread is continued in another post
    Re: ORA-03113 end of file on communication channel error
    There is a bug with hanlding of viewlink-consistency and DBsequence in Jdev 9.0.2 that leads to this issue as discussed in the other thread.

Maybe you are looking for

  • Should the column name in the not in clause be indexed?

    Hi, Everyone, I am having oracle database version 11.0.1.6 on windows server 2003 R2. I have a query like this: Select * from icm where customer_no not in (select customer_no from icm_pre); I would like to know whether we should index the customer_no

  • Settings Problem for Streaming Video/Audio

    I tried to watch the new OS 10.5 Panther. I receive the audio, but there is no video to watch. Can someone perhaps suggest a solution to being able to listen and watch the new system info.

  • Tax code not getting picked up from PO during SES

    Dear Experts, I am looking for configuration where the end user need not enter Tax code during SES. I tried a scenario where I did not maintain any service master and also did not enter any line item in service tab at item level, rather I processed m

  • Impossible commander des tirages iphoto

    Bonjour, Je possède un Mac Book blanc core 2 duo, OS X 10.7.5 et iphoto'08(7.1.5)(378). Depuis quelques jours, une fenêtre de dialogue m'indique que la commande de tirage n'est plus prise en compte par Iphoto7 et me redirige vers l'achat d'iphoto 9.5

  • Acrobat XI Won't Open

    On my Mac (OSX Mountain Lion (latest version)). Acrobat XI opens, displays a dialog box with no content other than a "quit" and "accept" buttons. The "quit" button quits the dialoge and terminates the application. The "accept" button doesn't respond.