How to cancel LrHttp.post calls

Hi,
I'm working on an export/publish service.  Before the uploading happens, there is some interaction with the remote application.  In general, whenever I launch an call I'd like to provide some feedback to the user that it's doing something and give them the option of canceling.  Currently, I have a LrTasks.startAsyncTask which leads into LrFunctionContext.callWithContext and then a LrDialogs.showModalProgressDialog.  After the dialog box comes up, the function drops into an LrHttp.post call.  I'm trying to figure out how if there is a way to connect the isCanceled property of the progressScope to the ability to cancel the LrHttp.post call.  (Currently, the only thing I can think of is to write a byte feeding and have it suddenly stop feeding bits. Any thoughts?
-Scott Selberg

The postBody parameter of LrHTTP.post() can be a function that returns the data to be sent in chunks.  You could have that function check a "cancelled" flag and return nil if the flag is set.  The behavior is not well specified and it's not clear what will happen if the function returns nil before it has returned the number of bytes specified by the totalBytes parameter -- does the HTTP POST get aborted?  If it doesn't get aborted, you could have the server side check to ensure that the number of bytes received in the body matches the Content-Length header (assuming that LrHTTP adds such a header). 

Similar Messages

  • How to cancel a posted question y Apple Communities

    Any idea on how to cancel/delete a question posted in Apple Support Community?
    I already solved the issue I was asking for so no need for a discussion forum...  
    Thanks!

    You cannot. Oracle does not offer that functionality.
    Hope this helps,
    Sandeep Gandhi

  • How to send te XML data using HTTPS post call & receiving response in ML

    ur present design does the HTTP post for XML data using PL/SQL stored procedure call to a Java program embedded in Oracle database as Oracle Java Stored procedure. The limitation with this is that we are able to do HTTP post; but with HTTPS post; we are not able to achieve because of certificates are not installed on Oracle database.
    we fiond that the certificates need to be installed on Oracle apps server; not on database server. As we have to go ultimately with HTTPS post in Production environment; we are planning to shift this part of program(sending XML through HTTPS post call & receiving response in middle layer-Apps server in this case).
    how i can do this plz give some solution

    If you can make the source app to an HTTP Post to the Oracle XML DB repository, and POST contains a schema based XML document you can use a trigger on the default table to validate the XML that is posted. The return message would need to be managed using a database trigger. You could raise an HTTP error which the source App would trap....

  • HPM= Stock Transport Order = How to cancel an Gain or Loss posting

    Hi,
    In OGSD 4.72  functionality HPM==>"Two-Step Transfers Including Profit and Loss Determination"
    We manage Goods movments with a stock transport order so when The u2018Delivery Completedu2019 Indicator is Set we have a gain or loss posted .
    Question: How to cancel this gain or loss in order to reverse the flow to stock in transit.
    Best Regards

    How are u posting gain loss;
    I am not able to post gain loss;system is generating extra line of reverse mvt typ and nullifies the loss/gain (using 303 & 305).
    When I am using STO, system is not assigning tracking no.
    whats settings ar reqd;
    regards
    Shruti

  • How to set CSRF token  to make a POST call via Destinations in HANA XS

    I have a requirement where I would want to make a POST call to Gateway Service,which would need a CSRF token.
    I fetch the CSRF token and then I use the same token during POST.
    Hence i set this in $.request.headers() .
    I know that I have to set the cookie as well for CSRF so I set the headers as
    req.headers.set("Cookie","'sap-XSRF_GIQ_100=TQRYJKzJSH8SknthcwRQFA%3d%3d20140425093233hxBe2w9qL9AjCtnh3gsIvPP6-IwsfZB2lqE5RtfGH8A%3d'")
    But this fails with CSRF token validation
    I found that the cookie value is not set in the service.
    How are cookies handled in  Hana how can i set my csrf and XSRF-Token cookie value in the request
    Thanks,

    Here is example code where I do this very thing - get the CSRF token for an ABAP/Gateway service and use it in the request. The CSRF Token should be a header not a cookie.
    var dest = $.net.http.readDestination("WileECoyoteABAP.services", "ZWILEECOYOTE_SRV");
      var client = new $.net.http.Client();
      //Get CSRF Token
      var CSRF = getCSRFToken(dest, client);
      //Make Request
      var req = new $.web.WebRequest($.net.http.POST, 'ACMEItemCollection/');
      req.headers.set("x-csrf-token",CSRF);
      req.headers.set("Content-Type","application/json");
      req.setBody('{"d": {"ItemId": "9999999999","Item": "'+Items.Details[0].ITEM+'"}}');
      client.request(req, dest);
      var response = client.getResponse();
    function getCSRFToken(dest, client){
      var req = new $.web.WebRequest($.net.http.GET, 'ACMEItemCollection/?$top=1&$format=json');
      req.headers.set("x-csrf-token", "fetch");
      client.request(req, dest);
      var response = client.getResponse();
      var CSRF = response.headers.get("x-csrf-token");
      if(response.status===200){}
      else{
      handleErrors(response);
      return CSRF;

  • No plan showed up on my account management to cancel, so I called and got a number, now I can't find how to end this subscription

    I logged on to my account when I received an E-mail telling me to fix my account payment settings. When I logged on there was no plan in my account management to cancel, so I called and received a number and assurance that this months charge would be canceled. I'm not sure where to enter this cancellation code or when my refund will be accommodated, so that is why I'm writing this today.
    Thanks,
    Aaron

    This is an open forum with a mix of other users and Adobe staff, not Adobe support... you need Adobe support
    Adobe contact information - http://helpx.adobe.com/contact.html may help
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • How cancel the post in CKMDUVMAT transaction

    Hello all,
    I need help with an issue about the distribution of inventory differences (CKMDUVMAT transaction).
    We have executed this transaction, the distribution and post, and we want to delete the post.
    In this transaction is available just  the distribution deletion.
    I try to cancel the material movememt with the transaction MBST, but the systems displays the following error:
    “Goods movement not possible with mvmt type Z61”
    Do you know if it’s possible to cancel the posting?
    Thanks a lot for your cooperation.
    Best regards.
    Cristina Ugalde

    Hello all,
    I need help with an issue about the distribution of inventory differences (CKMDUVMAT transaction).
    We have executed this transaction, the distribution and post, and we want to delete the post.
    In this transaction is available just  the distribution deletion.
    I try to cancel the material movememt with the transaction MBST, but the systems displays the following error:
    “Goods movement not possible with mvmt type Z61”
    Do you know if it’s possible to cancel the posting?
    Thanks a lot for your cooperation.
    Best regards.
    Cristina Ugalde

  • How do I escalate a call when tech support lose intere

    -----Original Message-----
    From:
    Sent: 24 March 2005 7:6
    To: 'CLE Customer Support'
    Subject: FW: How long do you expect me to wait for a reply?
    Do I have to go to trading standards to get you to honour this warranty? This is a disgrace - sort it out. This is extremely poor customer service and a breach of your warranty.
    -----Original Message-----
    From:
    Sent: 22 March 2005 08:5
    To: 'CLE Customer Support'
    Subject: RE: CLE - Technical Support Request (KMM563096I2452L0KM)
    How do I escalate this call? I have a card that is not working under warranty and you seem unwilling to answer my mails any more. I hate to be the bearer of bad news but you have to. This card must be fixed or replaced, and it would be nice if that happened sooner rather than later. Why am I doing all the chasing by the way, you're a big enough supplier to get this sort of thing right, aren't you?
    Rob.
    -----Original Message-----
    From:
    Sent: 7 March 2005 08:40
    To: 'CLE Customer Support'
    Subject: RE: CLE - Technical Support Request (KMM563096I2452L0KM)
    Hello, it's me again, not heard from you for 5 days. Are you planning to reply? You have obligations of warranty which you are summarily failing to carry out here. Please sort this out!
    Rob.
    -----Original Message-----
    From:
    Sent: 3 March 2005 7:28
    To: 'CLE Customer Support'
    Subject: RE: CLE - Technical Support Request (KMM563096I2452L0KM)
    Situation changed. Having restored settings to previous state after doing all the below, about a day later I now have no sound at all for no reason whatsoever. I have rebooted, re-checked all connections etc etc, sound has just disappeared in the middle of the day without changing anything. It was fine this morning and now it's completely silent and PC's been on all day. This card is definitely dead, what else would do that?!?!
    Cheers,
    Rob.
    -----Original Message-----
    From:
    Sent: 2 March 2005 6:03
    To: 'CLE Customer Support'
    Subject: RE: CLE - Technical Support Request (KMM563096I2452L0KM)
    Hi,
    OK, I can't test on another PC as I don't have access to one, and I really dohope this is the last set of tests incidentally. It worked, then it stopped one day. A complete reformat and clean driver install didn't fix it. Re-seating the card didn't fix it. Seems pretty straight forward to me the card has failed, and I do need it replacing.
    I have however done everything else below as requested. If I select CMSS, I get no output for rear-left/rear-right using channel test. If I select CMSS2, I get output from the front speakers for rear-left/rear-right channels, but nothing from the rear.
    If I configure to 5. and enable CMSS I get output from jacks and 3 (orange & green)of the soundcard in the left headphone earpiece.
    Hear from you soon,
    Rob.
    -----Original Message-----
    From: CLE Customer Support [mailto:[email protected]]
    Sent: 2 March 2005 03:7
    Subject: RE: CLE - Technical Support Request (KMM563096I2452L0KM)
    Dear Rob
    Thanks for your reply
    Please test the soundcard on another PC(With different motherboard) Ensure onboard soundcard is disabled.
    Run creative diagnostic test, any problems?
    Go to device manager, is there any problem with soundcard?
    Configure the speaker setting as 5..
    Please enable CMSS and play MP3.
    Use a earphone and connect to line-out of soundcard.
    Any sound?
    Now please try on line-out3, any sound?
    Please verify the correct jacks you are connecting..
    CMSS is an option that allows you to play your audio to all 5. speakers even if you are not playing a true 5. encoded audio file. For example, if the sound is a stereo sound, it will duplicate the front channels, and send them to the rear channels. Then it will mix the left and right signals to create a center channel. Turning CMSS on basically simulates
    5. audio.
    TO TURN ON CMSS IN Mediasource
    . Open MediaSource (Start, All Programs, Creative, Creative MediaSource, Creative MediaSource Organizer).
    2. There should be an EAX button underneath the Record button at the bottom of the screen, towards the left. Beside this button, there should be a small ellipsis button (. . .) that you can press. Click on this.
    3. Go to the CMSS 3D tab and check the box next to "Enable CMSS 3D"
    4. Place a dot next to either CMSS or CMSS2. Whichever sounds better to you.
    It is important to remember that if you do wish to play a 5. encoded file, you will need to turn CMSS off. Otherwise you might not receive each discreet channel.
    Please retain all the previous correspondence when replying to this email.
    Best Regards
    Creative Customer Support Services
    Creative Labs Europe
    To provide feedback on your "Creative Experience" and our service please click on the following link:
    http://www.**bleep**.com/support/con...asp?r=CLE&d=TS
    Please do not use this link to submit technical queries
    Original Message Follows:
    Hi,
    Tried all that and still no joy unfortunately. Everything ok except output from rear-left and rear-right.
    Always disable onboard sound nad have just reformatted XP and reinatalled with drivers from creative website, so I know installation is not corrupt and up-to-date. I also had this problem before re-installation of XP, so suspect hardware rather than software failure.
    Have removed all traces of card/drivers and tried again and moved PCI slots with same results.
    Cheers,
    Rob.
    -----Original Message-----
    From: CLE Customer Support [mailto:[email protected]]
    Sent: 0 March 2005 03:37
    Subject: RE: CLE - Technical Support Request (KMM5590925I2452L0KM)
    Dear Rob
    Thanks for your reply
    Rear center is fine in speaker test...
    Anyway if you have test the speaker with another device and no issue for rear channels, there is no problem with speaker system now...
    Please insert the soundcard on another PCI slot, and make sure it is firmly inserted. Please disable any onboard sound card if available through BIOS.
    Go to Control Panel, Add Remove Programs and un-install all listings related to your audio card. Do not restart your computer when prompted so.
    Go to Control Panel, and switch to Classic View. Click System, Hardware tab, Device Manager button and delete all sound cards entries in Sound, Video and Game Controllers as well as any previous sound card entries from the Device Manager.
    Reboot the computer and cancel out of any driver installation if you are prompted. Insert the Creative Sound Blaster installation CD into your CD-ROM dri've. Exit from the installation wizard if it autoruns.
    Click Start, Run and then Browse. Browse to Z:\Audio\Drivers\CTZAPXX.EXE, where Z represents the CD Rom Dri've.
    Choose YES if you receive a prompt "Overwrite existing shared creative audio driver files?"
    Select Driver un-installation for WDM drivers and click OK.
    When prompted to restart, say No.
    Click Start, Run, type MSCONFIG and press Enter.
    Check the box next to Selecti've Startup and deselect Load Startup Items.
    Select the SERVICES tab and select Hide All Microsoft Services.
    Uncheck all results and click OK.
    Browse to the C:\Temp folder and C:\Windows\TEMP (if it exists) - all files and folders in the temp folder need to be either deleted or moved to a new folder.
    Browse to Program Files, Creative and delete the Sound Blaster Folder - if you get a file that won't delete, right click on the file, click Properties and clear all the attributes. The file should then be able to be deleted.
    Empty the Recycle Bin, and reboot the computer.
    If you wish to reinstall your software & drivers, do this now. For more information on how to install your product, please visit the Product Guide page for installation instructions. Otherwise, go to the next step.
    Click on Start, Run. Type MSCONFIG and press Enter.
    Select Normal Startup, and press the OK button.
    Reboot the computer
    Run creative diagnostic test, any problems?
    Configure the speaker setting as 5.
    TEST CARD WITH HEADPHONES
    . Run speaker test
    2. Plug headphones into the front out jack 3. Click on the speaker test button 4. In the headphones you should hear a voice for front left, and front right.
    5. Plug headphones into the rear out jack 6. Click on the speaker test button 7. In the headphones you should hear a voice for rear left and rear right.
    8. Do you hear sound from each channel?
    Any sound from rear channels?
    Please retain all the previous correspondence when replying to this email.
    Best Regards
    Creative Customer Support Services
    Creative Labs Europe
    To provide feedback on your "Creative Experience" and our service please click on the following link:
    http://www.**bleep**.com/support/con...asp?r=CLE&d=TS
    Please do not use this link to submit technical queries
    Original Message Follows:
    Hi,
    I have done the below, and get output via a walkman connected directly to the sub on both front and rear speakers no problems at all.
    I have reconnected the cables from the sound card, run channel test again in speaker settings, and still get no output from rear-left and rear-right.
    I should have mentioned before that rear-centre is fine.
    Any further help will be greatly appreciated.
    Cheers,
    Rob.
    -----Original Message-----
    From: CLE Customer Support [mailto:[email protected]]
    Sent: 09 March 2005 08:40
    Subject: Re: CLE - Technical Support Request (KMM557969I2452L0KM)
    Dear Rob
    Thanks for contacting Creative Technical Support.
    Please use an external cd player and connect to the front input on the subwoofer.
    Play the CD, any sound?
    Now try on the rear input.
    Play the CD, any sound from the speakers?
    Now please connect back the speakers to the PC.
    Ensure you have connected properly.
    Ensure you have configure 6. speaker setting, run a speaker test.
    Any sound from rear channel?
    Ensure the balance control is configure properly as well
    Please retain all the previous correspondence when replying to this email.
    Best Regards
    Creative Customer Support Services
    Creative Labs Europe
    To provide feedback on your "Creative Experience" and our service please click on the following link:
    http://www.**bleep**.com/support/con...asp?r=CLE&d=TS
    Please do not use this link to submit technical queries
    Original Message Follows:
    =======================
    Subject: CLE - Technical Support Request
    Name:
    E-mail Address:
    Self Description:
    ID(3) Advanced PC User
    Country: United Kingdom
    Support Inquiry: ID(3) My Creative hardware stopped functioning correctly
    Product: Sound Blaster? Audigy? 2
    Purchase Date: 4/3/2004
    Serial Number:
    Operating System: Windows XP
    Creative Model Number: SB0240
    Computer Brand/Model: self built
    Processor/CPU: Athlon 3200+
    Memory: 2xgb DDR400 Dimms
    BIOS Type/Revision: Phoenix - rev 008
    System Board/Chipset: ASUS A7N8X Deluxe rev2.0
    Detailed Problem Description:
    Typical, following months of trying to get a replacement remote control cable for my inspire 6. 6700 the 2 rear speakers on the set don't play sounds any more. I have done a clean XP install to ensure no driver corruption, but no difference. It's not the subwoofer as I have a spare, unused sub and that gives the same results.
    I have also checked all cabling, mixer/volume settings and nothing unusual is showing.
    Of course, my audigy 2 card is my guess as the culprit, I can't be positi've though. All other speakers operate perfectly, can even hear background hiss through the rear-left and rear-right speakers which won't play sounds/music/games or anything at all. But when I select "Creative Speaker Settings" to test the channels individually, they don't play a test sound here either.
    Any help greatly appreciated.
    Cheers,
    Rob.
    PS: Please remove the technical support advisor name when posting quote from the email.Message Edited by Jason-CL on 03-30-2005 06:7 AM

    Hi qwerty,
    Dun tink that creative customer support sucks cos I had been dealing with them in the past and I can say that their service are quite gd and fast. If you wanted a refund, I tink you need to contact the store that sells you the product. Dun tink creative will refund you though.

  • The call was cancelled by the caller before the remote party answered

    Hi,
    We have a Lync 2010 Enterprise deployment in a single site with 2 FE and Mediation Server collocated.
    When dialling a number from a PSTN phone the call gets routed via our PBX/PBX Gateway/Mediation Server/FE Server to the desktop Lync client successfully.
    As soon as the user answers the call with the Lync client the call 'hangs' and terminates without hearing anything on either side.
    The snooper logs show:
    Error:
    SIP/2.0 487 Request Terminated
    Partial Content:
    User-Agent: UCCAPI/4.0.7577.4398 OC/4.0.7577.4398 (Microsoft Lync 2010)
    Ms-client-diagnostics: 52092;reason="The call was cancelled by the caller before the remote party answered"
    Content-Length: 0
    Please help?
    Vinkie

    What kind of gateway are you using to connect to your PBX and how?  What is your media set to?  G.711 μ-law or a-law?  I'd check media settings there as a starting point. 
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".

  • How to cancel the background job processing in ABAP programming?

    Hi,
    I have a requirement where i need to cancel the job depending on some constraint. My code is something like this:
    Select some data from the table.
    if sy-subrc = 0.
    Do nothing.
    Else
    Cancel the job
    call function 'BP_JOB_ABORT'
      exporting
       jobcount                         = number
        jobname                          = name
    EXCEPTIONS
       CHECKING_OF_JOB_HAS_FAILED       = 1
       JOB_ABORT_HAS_FAILED             = 2
       JOB_DOES_NOT_EXIST               = 3
       JOB_IS_NOT_ACTIVE                = 4
       NO_ABORT_PRIVILEGE_GIVEN         = 5
       OTHERS                           = 6
    The above code is cancelling the job but it is throwing an exception called CX_SY_DYN_CALL_PARAM_MISSING because i dint pass job count. How can we find the job count of next job that is going to run? Or How to handle the exception which it is throwing. Even if i try to handle that exception something like this:
    TRY
    call function 'BP_JOB_ABORT'
      exporting
       jobcount                         = number
        jobname                          = name
    EXCEPTIONS
       CHECKING_OF_JOB_HAS_FAILED       = 1
       JOB_ABORT_HAS_FAILED             = 2
       JOB_DOES_NOT_EXIST               = 3
       JOB_IS_NOT_ACTIVE                = 4
       NO_ABORT_PRIVILEGE_GIVEN         = 5
       OTHERS                           = 6
    RAISE EXCEPTION TYPE CX_SY_DYN_CALL_PARAM_MISSING.
    CATCH
    CX_SY_DYN_CALL_PARAM_MISSING.
    ENDTRY.
    It avoids the exception but it doesnt cancel the job.  I even tried with function modules like JOB_OPEN
    JOB_SUBMIT,BP_JOB_SELECT,BP_JOB_ABORT and tried to build some logic using status overview table (TBTCO) and TBTCP (Jobstep overview table).
    Can someone suggest me the right way to write this program ?
    Thanks in advance.
    Rashmi

    Hi,
    Problem is solved.
    Create an background job with 2 steps. The first step in the background job calls the program ZBACKJOB_STEP1.  In the variant we have a wrong material number
    If the material number is not found in Mara, the next step in the job should not get executed and the job should get cancelled..
    In the above posts i had asked how do I get the job count of the job that is currently triggering the program at the runtimeu2026..If u see the below code uu2019ll get to know.. We have to use the standard structure TBTCM which captures the properties/characteristics of the job.
    REPORT ZBACKJOB_STEP1.
    TABLES: MARA,TBTCM.
    PARAMETERS : MATNR TYPE MATNR.
    START-OF-SELECTION.
      SELECT SINGLE * FROM MARA WHERE MATNR = MATNR.
      IF SY-SUBRC IS INITIAL.
        WRITE / : 'This is the material selected on the selection-screen' , MARA-MATNR.
    ELSE.
            CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
          IMPORTING
            EVENTID                                    = TBTCM-EVENTID
            EVENTPARM                             = TBTCM-EVENTPARM
            EXTERNAL_PROGRAM_ACTIVE = TBTCM-XPGACTIVE
            JOBCOUNT                                = TBTCM-JOBCOUNT
            JOBNAME                                  = TBTCM-JOBNAME
            STEPCOUNT                              = TBTCM-STEPCOUNT
          EXCEPTIONS
            NO_RUNTIME_INFO                    = 1
            OTHERS                                     = 2.
        IF SY-SUBRC = 0.
          CALL FUNCTION 'BP_JOB_ABORT'
            EXPORTING
              JOBCOUNT                                     = TBTCM-JOBCOUNT
              JOBNAME                                       = TBTCM-JOBNAME
            EXCEPTIONS
              CHECKING_OF_JOB_HAS_FAILED  = 1
              JOB_ABORT_HAS_FAILED              = 2
              JOB_DOES_NOT_EXIST                   = 3
              JOB_IS_NOT_ACTIVE                      = 4
              NO_ABORT_PRIVILEGE_GIVEN       = 5
              OTHERS                                         = 6.
          IF SY-SUBRC <> 0.
          ENDIF.
        ENDIF.
      ENDIF.
    Regards,
    Rashmi

  • PLEASE tell me how to CANCEL my PROTECTION PLAN on my phone!!!!

    I need someone from BEST BUY to tell me how to cancel my protection plan on my LG ALLY. It is the plan that we are charged $9.99 monthly for. Mid Feb, my husband called and cancelled and we were told it was cancelled. Mid March, we got charged. We called again beginning April and was told it was cancelled and that we would receive an email confirmation. Never received one. Mid April, we were charged again. We called AGAIN and asked to speak to a supervisor. They said they would cancel it and send a confirmation via postal mail. NO CONFIRMATION. My husband called again today (as it is coming up for us to be charged again) and was told that it is on a record that we TRIED to cancel, but Geek Squad never confirmed it (how is that my fault?!?) and that we would have to contact Geek Squad (despite we are contacting the number we were told to contact). So why weren't we told this 3 months ago...and how in the world can we get this ridiculous service cancelled and NEVER charged again to our account!!!????!!!
    HELP!!!!!!!!!!!!!!!!!!!!!!!

    What number are you calling?
    For BBYM Monthly Protection Plans, the direct number is 1-866-548-0885.
    Dan K. | Mobile Specialty Stores
    Any opinions expressed in this post are those of
    the author and do not represent Best Buy Co., Inc.

  • 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.

  • Cancellation of posted excise invoice

    Dear All,
    How to cancel posted incoming excise invoice without cancelling the GRN.
    User had posted the excise invoice wrogly so now they want to cancel that. For this we have to first reverse GRN but stock also get consumed meanwhile so system is not allowing to reverse GRN. How to resolve this?
    Manoj

    Dear All,
    We can cancel the posted excise invoice for purchase also.
    But for that we have to first revers the GRN.
    Now in out case it is not possible to revers the GRN.
    How to solve this?
    Manoj

  • Cancelation of posted excise invoice

    Dear Gurus,
    The user has posted the excise invice in J1iex. By mistake he has captured wrong values. How to reverse the posted invoice

    hi
    now steps for excise invoice cancellation will be as follows
    1 cancel MIRO document with MR8M
    2 cancel MIGO document in MIGO
    3 go to J1IEX choose post here give the excise invoice no of the document (u will get this no from table J_1IEXCDTL and field DOCNO)
    4 now in miscellaneous tab give the rejection code and simulate u will find all the duties are reversed (compare with previous posting)
    5 now ur invoice is cancelled and u can go for new GR and new postings
    regards
    KI

  • How to cancel excise invoice when mov type is 122

    Hello,
    We are creating the PO for one material. and make the GR for that material (material is Quality inspection material)
    so i,e the reason the material is goes to Quality inspection.
    Till then we are Made the J1IEX create the Part1 and Part2 entry.
    So in mean while in Quality all the material's are rejected so, now how to reverse the Part1 and Part2 entries.?
    How to cancel excise invoice when material is qulaity inpspection.
    What i made:
    Made the Return delivery means 122 mov doc and Try to cancell the excise invoice......but no successful
    Regards
    sapman man

    Hi
    Cancelling of excise invoice will be done in the following ways depending on the situation.
    Case 1:
    Create PO
    Do MIGO (create and post excise invoice)
    Create return delivery in quality inspection.
    Now we have to create a rejection inmvoice in J1IS with reference to the return delivery wherein the excise values gets reversed.
    If u try to reverse part 2 entries in J1IEX it will not come.
    Case2:
    Create PO
    Do MIGO (create and post excise invoice)
    Do cancellation of MIGO (102 mvt)
    With ref to vendor or internal excise invoice number just post the transaction. excise part 2 entries will get reversed. This will happen only if 102 entry exist for the PO line item.
    In a nutshell excise entries cancellation comes only if we cancel the material document. If we do return delivery then we have to create rejection excise invoice.
    Hope u get cleared in this regards
    Reg
    Raja

Maybe you are looking for

  • Trying to place a new order (Transfer from Virgin/...

    Hi all, I am trying to transfer across from TalkTalk/Virgin, and have hit a snag - I hit this error message when submitting for the package I want: Sorry- "We can see from your details that you've already placed an order to stop your current service.

  • Video Animation problem

    Hello, I have come across a problem where if I have applied an effect to a video clip such as Gaussain and make an adjust to the timing of the effect under Video Animation option, it wont save that particular adjustment and wont render it. Any help w

  • BT, please remove BT IP address from 3 blacklists

    Hello, Today, suddenly, at about 14:30, I couldn't access several websites. I am an existing BT broadband customer. To cut a longer story short, it appeared that the IP address that BT (randomly) allocates, was at that time: 86.137.103.242.  The IP a

  • Lost sound on Power Point (.ppds) attachments to eMails

    Since I have upgraded my Mac to MAC OS X Snow Leopard (10.6.1), I am unable to get any sound on .pps attachments to eMails (the same attachments to the same eMails received on my PC laptop do produce sound). In an attempt to maybe solve this problem,

  • OIM , Approval WorkFlow Page Error

    Dear All, Kindly if anyone can share some experience on the following issue: 1 - I have IDM 9.1.0.x 2 - To define the approval workflow when I try to open the workflow designer i.e Manage Resources>Manage> select resource ... it shows error page with