Problem adding Payments /w DI-API

Hello,
I am trying to update a payment through the DI-API. I am using the oIncomingPayments busness object. I am also using PL:9 and the problem I am having is: it is asking for the LineID but the LineID is write only. So it seems that there is no way to add a Check or Credit Card payment through the DI-API unless there is some way to retrieve/or fill this field. Is there a way to do this? Am I missing something or is this a bug?
Thanks for any and all help,
Jeremy Adam

Here is a samplette of the code... First I update or add the incomming Payment General information then I add the credit card payment... I am using a JSON string to bring in the data from a extrenal source... It works but is giving me an error: "Cannot insert the value NULL into column 'LineID', table 'vdimport.dbo.RCT3'; column does not allow nulls. INSERT fails" But LineID is a Read only and if there is no current credit card item I can't retieve it. I am assuming that I am just missing something or need a second pair of eyes to see something that I am over looking... Anyways, Thanks... :P
If tableName = "ORCT" Then
                        Do While count <> json.optJSONArray(tableName).getJSONObject(countRow).Count
                            sMessage += json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                            Select Case json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString
                                Case "Address"
                                    boData.Address = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                Case "CardCode"
                                    If bUpdate = False Then
                                        boData.CardCode = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    End If
                                Case "CardName"
                                    If bUpdate = False Then
                                        boData.CardName = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    End If
                                Case "ContactPersonCode"
                                    boData.ContactPersonCode = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                Case "DocEntry"
                                    'Return xmldoc.SelectNodes(sPath).Item(0).ChildNodes(countTables).ChildNodes(countRows).ChildNodes(countFields).InnerText
                                    If boData.GetByKey(json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString) = True Then
                                        bUpdate = True
                                    Else
                                        bUpdate = False
                                    End If
                                Case "DocDate"
                                    boData.DocDate = CDate(json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString)
                                Case "DocNum"
                                    '         boData.DocNum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                Case "CashSum"
                                    If bUpdate = False Then
                                        boData.CashSum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    End If
                                Case "TransferAccount"
                                    boData.TransferAccount = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                Case "TranferSum"
                                    boData.TransferSum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                            End Select
                            count += 1
                        Loop
                    ElseIf tableName = "RCT3" Then
                        '// Credit Card Payments
                        count = 0
                        countRow = 0
                        sMessage = ""
                        Do While countRow <> json.optJSONArray(tableName).Count
                            Do While count <> json.optJSONArray(tableName).getJSONObject(countRow).Count
                                sMessage += bUpdate.ToString + " :: " + json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString + " : : " + json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString + " :: " + count.ToString + " : : " + json.optJSONArray(tableName).getJSONObject(countRow).Count.ToString
                                Select Case json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString
                                    Case "DocNum"
                                        '        boData.DocNum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "AdditionalPaymentSum", "AddPmntSum"
                                        boData.CreditCards.AdditionalPaymentSum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "CardValidUntil", "CardValid"
                                        boData.CreditCards.CardValidUntil = CDate(json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString)
                                    Case "ConfirmationNum"
                                        boData.CreditCards.ConfirmationNum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "CreditAcct"
                                        boData.CreditCards.CreditAcct = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "CreditCard"
                                        boData.CreditCards.CreditCard = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "CreditCardNumber", "CrCardNum"
                                        boData.CreditCards.CreditCardNumber = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "CreditSum"
                                        boData.CreditCards.CreditSum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "CreditType", "CrTypeCode"
                                        If json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString = "cr_InternetTransaction" Then
                                            boData.CreditCards.CreditType = SAPbobsCOM.BoRcptCredTypes.cr_InternetTransaction
                                        ElseIf json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString = "cr_Regular" Then
                                            boData.CreditCards.CreditType = SAPbobsCOM.BoRcptCredTypes.cr_Regular
                                        Else
                                            boData.CreditCards.CreditType = SAPbobsCOM.BoRcptCredTypes.cr_Telephone
                                        End If
                                    Case "FirstPaymentDue", "FirstDue"
                                        boData.CreditCards.FirstPaymentDue = CDate(json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString)
                                    Case "FirstPaymentSum", "FirstSum"
                                        boData.CreditCards.FirstPaymentSum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "NumOfCreditPayments", "NumOfPmnts"
                                        boData.CreditCards.NumOfCreditPayments = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "NumOfPayments"
                                        boData.CreditCards.NumOfPayments = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "OwnerIdNum"
                                        boData.CreditCards.OwnerIdNum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "OwnerPhone"
                                        boData.CreditCards.OwnerPhone = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "PaymentMethodCode"
                                        boData.CreditCards.PaymentMethodCode = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "SplitPayments"
                                        If json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString = "tYes" Or _
                                        json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString = "Y" Then
                                            boData.CreditCards.SplitPayments = SAPbobsCOM.BoYesNoEnum.tYES
                                        Else
                                            boData.CreditCards.SplitPayments = SAPbobsCOM.BoYesNoEnum.tNO
                                        End If
                                    Case "VoucherNum"
                                        boData.CreditCards.VoucherNum = json.optJSONArray(tableName).getJSONObject(countRow).getValue(json.optJSONArray(tableName).getJSONObject(countRow).names.Item(count).ToString).ToString
                                    Case "LineID"
                                        '             boData.CreditCards.LineNum = count
                                End Select
                                count += 1
                            Loop
                            boData.CreditCards.Add()
                            countRow += 1
                        Loop
                    countTable += 1
                Loop
                'Udate each row before moving on to the next row
                If bUpdate = False Then
                    'MessageBox.Show("Updating")
                    '    Return "got Here"
                    lRetCode = boData.Add
                Else
                    lRetCode = boData.Update
                End If

Similar Messages

  • Adding payment through DI API referring to Correction Invoice/Down Payment

    Dear All,
    In SBO 2004C (PL 72) I have to add incoming payment referring to correction invoices and down payment invoices.
    In Payments_Invoices Object there is and InvoiceType Property which should be set to the object type of the referred document. Having set this to it_Invoice, it_CredItnote and it_JournalEntry it works fine, but I cannot find a working value for  Correction invoices and Downpayments.
    In BoRcptInvTypes Enumeration there is a it_CorrectionInvoice member, but it does not work. DownPayment member does not exist at all.
    Instead of Enumerations members DI API acepts numeric object type values 13, 14, 30 which works just as the above it_Invoice etc. does, but Correction invoice's object type 165  just does not work
    Has anyone experience with this?
    Is is really not possible to add invoice type payments referring to these documents through DI?
    Any ideas are welcome.
    Thanks a lot.
    Regards.
    Bálint

    Hi
    It is possible in 2005 Clusters But i am not sure in 2004 C.
    In 2005 DI API accepts Enumerations members ,In Which Both it_CorrectionInvoice,DownPayment  Exists and i hope these works fine 2005.

  • AP Payment Upload Using API or Interface

    Hi ,
    I had requirement to upload the AP payment information using API or Interface. I have the below code. But is showing some "Unexpected" error.
    declare
    p_num_printed_docs NUMBER;
    p_payment_id NUMBER;
    p_paper_doc_num NUMBER;
    p_pmt_ref_num NUMBER;
    p_return_status VARCHAR2(200);
    p_error_ids_tab IBY_DISBURSE_SINGLE_PMT_PKG.trxnErrorIdsTab;
    p_msg_count NUMBER;
    p_msg_data VARCHAR2(200);
    begin
    MO_GLOBAL.SET_POLICY_CONTEXT('S',84); --- Apps intialize
    fnd_global.apps_initialize(1823,20639,200); --- Apps intialize
    IBY_DISBURSE_SINGLE_PMT_PKG.SUBMIT_SINGLE_PAYMENT(
    p_api_version => 1.0,
    p_init_msg_list => fnd_api.g_false,
    p_calling_app_id => 200,
    p_calling_app_payreq_cd => '13011',
    p_is_manual_payment_flag => 'Y',
    p_payment_function => 'PAYABLES_DISB',
    p_internal_bank_account_id => 10000, -----12001,
    p_pay_process_profile_id => 161,
    p_payment_method_cd => 'CLEARING',
    p_legal_entity_id => 23324,
    p_organization_id => 84,
    p_organization_type => '',
    p_payment_date => sysdate,
    p_payment_amount => 111,
    p_payment_currency => 'USD',
    p_payee_party_id => 91678,
    p_payee_party_site_id => 45272,
    p_supplier_site_id => '',
    p_payee_bank_account_id => '',
    p_override_pmt_complete_pt => 'N',
    p_bill_payable_flag => 'N',
    p_anticipated_value_date => '',
    P_MATURITY_DATE => '',
    p_payment_document_id => 1,
    p_paper_document_number => '',
    p_printer_name => '',
    p_print_immediate_flag => '',
    p_transmit_immediate_flag => '',
    x_num_printed_docs => p_num_printed_docs,
    x_payment_id => p_payment_id,
    x_paper_doc_num => p_paper_doc_num,
    x_pmt_ref_num => p_pmt_ref_num,
    x_return_status => p_return_status,
    x_error_ids_tab => p_error_ids_tab,
    x_msg_count => p_msg_count,
    x_msg_data => p_msg_data
    commit;
    DBMS_OUTPUT.put_line ( p_return_status || '---''---' || p_msg_data || '--''--' || p_msg_count );
    IF p_msg_count = 1 THEN
    DBMS_OUTPUT.put_line ( p_return_status || '---''---' || p_msg_data || '--''--' || p_msg_count );
    ELSIF p_msg_count > 1 THEN
    FOR i IN 1..p_msg_count LOOP
    DBMS_OUTPUT.put_line ( i||'. ' || fnd_msg_pub.get (p_encoded => fnd_api.g_false) );
    END LOOP;
    ELSE
    DBMS_OUTPUT.put_line (p_return_status);
    END IF;
    end;
    If anyone knows the solution please respond quickly. This is quite urgent requirement. If I am not using right API then please suggest as well. This requirement for Oracle Apps R12
    Regards,
    Prakash

    Hi,
    Can you please advise if you had a response for your message.
    Regards,
    Sunil

  • Cannot place order ERROR: "There was a problem adding your product to cart"

    Hey guys,
    Well, once again Best Buy's online system is preventing me from making an order. It seems like nearly every time I log in I experience some new problem. This time, I'm unable to add anything to my cart. It doesn't matter what item I try to add to my cart or what browser I use or if I clear cookies...it happens every time, on every browser, with every product in the store. The error shows a red & white triangle with a message "There was a problem adding your product to cart".
    Just to clarify ahead of time: 1) I have already tried signing in using 4 different browsers (explorer, firefox, chrome, opera) & they all give the same error; 2) Prior to posting here I researched this problem & found out it is somewhat common & has been occurring since at least 2012 on BestBuy.com; 3) Every time someone posts in here about this problem, customer service offers the same "fix" every time - to sign out, clear their browser cache of cookies, shut down the browser, restart the browser, sign back in, etc.... The only problem is, this "solution" has not worked ONE time our of the many times this problem has cropped up in here over the past 3+ years. Why this "solution" keeps getting told to people even though it never works is beyond me. But, there you have it.
    Just to clarify: I have already tried this solution, And just like with everyone else before me, it didn't work for me either. So, what's the next step? There must be something else that can be done other than waiting a couple more days for it to magically fix itself (it seems that is the only thing that ever "works"...is to let several days go by and the problem ends up getting fixed in some back-end server-side patch up). 
    What I'm hoping for from you is a solution that can fix this immediately. This problem has already prevented me from making a couple purchases for items that were temporarily on sale over the past couple days. So, those are lost sales for Best Buy. What I'm hoping to do now is pre-order the Elder Scrolls Online (PS4) in order to take advantage of the $10 pre-order reward. The game releases on Tuesday the 9th. So, in order to get this done in time I need to place the order sometime today (on the 8th).
    With all these repeated technical problems making purchasing a chore & wasting my time every single time I want to buy a product it's almost as if Best Buy is telling customers "We don't care if our online system works reliably...go spend your money at Amazon instead". lol
    Thank you in advance for your timely help on this matter.
    -Marc (removed per forum guidelines)

    Hello mjswooosh,
    I'm very disheartened to hear that you've had ongoing problems when attempting to order from BestBuy.com. Our goal is ever to provide a fun and efficient shopping environment! Certainly creating aggravation serves neither you nor us and I apologize sincerely for this having been your experience.
    We recommend the troubleshooting steps you mentioned (i.e., clearing the browser cache, deleting temporary internet files and cookies) because this is the most common cause of this type of problem. I too have encountered this issue from time to time and these steps have almost always resolved the problem. I say almost always because there's one further step you can try: ensure that you have signed out of BestBuy.com, then perform the browser maintenance steps we've recommended. Afterward, before signing in to BestBuy.com, add your desired items to your cart and sign in as part of the checkout process. When the standard steps have not netted a resolution for me, this has solved the problem each time.
    I hope this helps. I'm very grateful that you took the time to write to us with your concerns and for sharing your very valuable feedback about your online experience.
    Sincerely,
    John|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Problem adding HP J6400 all-in-one printer

    We have an HP Officejet J6400 all-in-one printer here at work, and all of our computers have had no problem adding this printer except one: an older iMac, PowerMac 6.1 (with the white domed base). The driver is installed, and the computer sees the driver, but when I click to add it eventually it gives me this error:
    "An error occurred while trying to add the selected printer. client-error-not-authorized"
    I was on the phone with HP for an hour and they couldn't figure it out on their end. Has anyone had a similar problem, or have a solution?

    Hi,
    I request you to try the following:
    For network connection:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03086294&tmp_task=useCategory&cc=us&dlc=en&lc=e...
     For USB:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03521864&tmp_task=useCategory&cc=us&dlc=en&lc=e...
    Although I am an HP employee, I am speaking for myself and not for HP.
    Say thanks by clicking the "
    Kudos! Thumps Up" which is on the right
    Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue
    Regards,
    Ray

  • I upgraded to Mountain from Snow and find that there is now a problem adding iphoto to the cloud.  I have iphoto '08,version 7.1.5.  Tried to follow one poster's advice and upgrade to 9.1 but I need 9.0 first and I can't find that.  suggestions? thanks!

    I upgraded to Mountain from Snow and find that there is now a problem adding iphoto to the cloud.  I have iphoto '08,version 7.1.5.  Tried to follow one poster's advice and upgrade to 9.1 but I need 9.0 first and I can't find that.  suggestions? thanks!

    You have to buy iPhoto from the Mac App Store.

  • Adding custom message in exception list of F110 transaction without adding payment block

    Hi All,
    My requirement is to add custom message in exception list of F110 transaction based on certain fields validation without adding payment block .
    I tried using BTE 1820 where I can add my validation but am not able to add the custom message in exception list.
    Thanks,
    Mihika.

    Hi Raymond,
    Thanks for your reply.
    I did checked the document and tried giving the S and I message in my BTE with trace option checked on Additional log screen.
    But Success and information message doesn't showed in Exception List.
    If I set the Error message the Proposal gets cancelled and I can see my error message in log. (We don't want this option as in this option proposal is not getting created)
    If I set the Payment block I can see that logged in exception list. But we don't want to set the payment block but the message should appear in exception list.
    I added the message using simple message statement. Will you please advice if any other way to add the message other than using the MESSAFE statement.
    Thanks,
    Mihika.

  • Problem in Payment Run with Debit Memos

    Hi Every one
    I am facing the problem in payment run in which vendor debitmemos were picked up but they are in the exception list. I was observing it in various vendors and have tested in QA that as well when there is an invoice to be paid these debit memos automatically adjustedagainst those invoice and hence net amount is being paid. The problem is these debit memos were generated in exceptional list about an year ago but at that time they were not considered in payment as they had no invoice against it to net off. But after that everytime they run payment run they come in this exceptional although there is invoice against them to net off the payment. Can any body help me out in this regard what could be the possible reason for this and any solution for this. Thanks in advance.

    Hi,
    In F110 while  enteingr the parameters in the free selection choose the document number in the Field name
    and give the document numbers of only invoices. dont include the debit meoms.
    then you will not get the exception list at all.
    Regards,
    Padma

  • I have problem with payments.

    Hello. I have problem with payments.
    I have choosen year CC plan, with monthly payments, and it was automated process untill this month. I cleaned up my bank account, before Adobe get charge. I have got reminder about payment, and today I have money on bank account, but its too late and I don`t know what have I do. Sorry for my bad english. Anyone can help?

    contact adobe support, http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Issue / problem adding audio in Presenter 7 (PowerPoint 2010)

    Since I got a new PC (Windows 7), I'm having an issue / problem adding audio in Presenter 7 (PowerPoint 2010).
    It doesn’t happen every time, but randomly with many presentations...
    In PowerPoint, right after I import audio (through Presenter) and click “ok”, I get the following errors:
    Then, I can't get into the "import/sync/edit" mode, from the Presenter tab...
    Already tried reinstalling Presenter, resaving new presentations, deleting the .ppcx/audio folders, importing the audio locally (vs from my network drive), etc.
    Then sometimes, randomly, it will let me get back in and edit the audio, after numerous attempts…?!? I can't figure out what the pattern is, which is causing this new problem (never had this problem before, w/ my old PC - Win XP / PowerPoint 2003 / Presenter 6 & 7)
    Anybody have an idea what the issue could be?
    Thanks,
    Mike P.

    Hello,
    I  tried to reproduce this issue but I am not getting any error message. Please provide us following information; this might help to reproduce this issue:-
    1) You are seeing this issue in  PPT or PPTX
    2) You seeing this issue in newly created presentations or its just old presentation which is not working properly.
    3) OS and PowerPoint version
    4) If this issue is consistent on any particular presentation then please share it.
    5) Can we have exact reproducible steps
    Regards,
    Shubhi

  • A/R Invoice + Payment using DI API

    How can we create an A/R Invoice + Payment using DI API ?

    Hello,
    You (should) create a A/R invoice first, then you can create a payment based on the invoice.
    or If you create the payment first later the invoice you should reconsile the 2 transactions.
    Regards,
    János.

  • Problem in payments terms

    Dear sap guru,
    i have a problem in payments terms.
    When we create P.O. at that time payment terms is compulsory.But now-a-days problem is created, if we entered payment terms for 15 days at that time its shown 30 days in some P.O. and 15 days in some P.O.
    Pls tell me what i do.
    Thanks and regards,
    Anurudh Singh

    hi
    you get better answer in MM forum,
    -ashok

  • Problems of payment

    Hi
    I have problems of payment When I want to buy Additions or extras for programs and games
    And ask me contact customer service I would like to know why if you allow

    contact itunes store support by going to expresslane.apple.com or calling apple

  • All new podcasts blank - There was a problem adding "" to iTunes.

    All new podcast episodes have a blank name, but the description is there. Clicking the exclamation point next to it yields - There was a problem adding "" to itunes.
    This is not just my old subscriptions but new ones as well. The episode actually downloads completely but does not get added to my library.
    Anybody have a suggestion how to resolve this?

    After days of no solution, as soon as I post it decides to resolve this by itself.

  • Problem adding elements to a group after removing everything...

    Hi everyone,
    I would really appreciate some help on something. I have a Group that has some Buttons in it. This Group is in one of fours States, and there is a componant for each State. After the user goes through the rest of the program and comes back to this State, I want to remove the old buttons, and add new buttons with new values. Bascially, I want to refresh the componant when it is visited a second time. I have a problem adding new Buttons to the group when the user revisits the componant / state.
    The group is created:
              <s:VGroup id="buttons"  x="0" y="35"  height="400" width="280" />
    When the init function for that componant is called, buttons are added from an array of buttons:
    for(var i:int = 0; i < 10; i++){
              var button:Button = questions[i];
              trace(button);
              button.addEventListener(MouseEvent.CLICK, myEventHandler);
              trace(buttons);
              buttons.addElement(button);
    When the user moves on to the next State, the buttons are removed:
    if(counter == 4){
              buttons.removeAllElements();
              FlexGlobals.topLevelApplication.currentState = 'Summary';
    When the user comes back to the initial state, the buttons are not added to the Group like they are the first time. The output of the trace as each button is added is also different the second time:
    First time: (successful)
    Main.MainBackground2.contentGroup.gameComp.buttons
    button8
    Second time:
    buttons
    button8
    Can anyone point me in the right direction? And better question, is there a better way I should be doing this?
    Is there a better way to refresh everything within a component upon viewing it s second time?
    Thanks in advance!

    I'm not sure why you are using addElement() to add the buttons. Aren't you supposed to let the state functionality handle when the buttons should be visible? That's the cleanest way to do it in most cases. You may want to post a larger code sample, where you have boiled down the code into a minimal sample that still enhibits the issue.
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex Training and Support Services

Maybe you are looking for