locked
Ensuring only one opportunity exists per campaign/account pair RRS feed

  • Question

  • Hi folks

    What is the correct method of ensuring only a single opportunity exists for a campaign/account pair?  I want to create opportunities for users when they click a button, but I don't want two users clicking the button at the same time to be assigned the same account under the same campaign...

    Any ideas? :)

    Cheers!

    Friday, August 15, 2014 8:42 AM

All replies

  • So the opportunity will be having a lookup for account by default and campaign. You can stop this by either javascript on the button click to verify if another opportunity exisits, this may not work if the security roles of user is not having privileges to read another user's opportunity. Another way is using a plugin, u can achieve the desired result even if user dont have access to the opportunity since plugin can have impersonation of admin user.

    If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com

    Friday, August 15, 2014 11:01 AM
  • That is good advice, but it doesn't stop two users getting the same opportunity created at the same time...
    Friday, August 15, 2014 12:21 PM
  • That is the best possible solution. Any further restriction will not be supported manner.


    If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com

    Friday, August 15, 2014 1:43 PM
  • Not really - I figured that after creating the opportunity, if a search is performed for opportunities in the same campaign with the same account, and the earliest one is not the one that was just created, delete the new one and try again.  That will perform much better than your solution, and requires no plugins or button modification.

    Again, thanks for the help though.

    Friday, August 15, 2014 3:38 PM
  • Is that the solution?? Manually search and delete the opporunity?? If its a manual operation, then there is no need to post this question in crm development forum this is the basic thing users can do, still every user need to have global access in opportunity if thats alright with thr business..

    If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com

    Saturday, August 16, 2014 12:43 PM
  • Hello Guy,

     While your solution may work for the time being, please consider the implication of deleting the opportunity - including data loss. I would advise you to create a plugin step or real time workflow to handle this.

    JavaScript does not get triggered while data import, bulk edit etc.

    Regards,

    Jithesh

    Monday, August 18, 2014 4:08 AM