Getting the opportunity ID

I'm trying to get the ID of an opportunity that is created when you create a quote without first creating the opportunity. CRM will create an opportunity in the background and add the word "Auto :" to the text on the opportunity.

The problem is that I need to run a tablescript on insert of the opportunity that has "Auto :" in the oppo_description. I can pick this up in the insertrecord on the opportunity but I cannot get the opportunity ID. By this point the quote is out of context so I can't pick that up either.

Any ideas?

  • 0

    Hi Lee,
    What I understood from your post is that, you want to update Opportunity Description field with “Auto” value after creating a direct Quote without any opportunity. When you create any quote you will be redirected to quote summary screen. So I would suggest you to write code logic to update the same on Quote Table Level Script. You can get opportunity id in Table Level Script with the help of eWare.GetContextInfo(“”) function in UpdateRecord() method.
    Once you get opportunity id, you can make any operation on the opportunity record.

    Hope this helps!

    Regards,
    Dinesh

  • 0

    I'm not sure how you got that from my post at all.

    I'm trying to get the ID of an opportunity in a tablescript on an Auto-Opportunity.

    CRM already adds the "Auto :" text to the description field if you create a quote without first creating the opportunity. I have to have this in the opportunity tls because I need to update values in it from the quote.

  • 0

    Actually, I have come at this a different way. You are correct in that I can get to this via the quote so thanks for putting me in a new direction that may work!

  • 0

    Finally I got this working. Thanks. Your suggestion did put me in the right direction!