Announcement

Collapse
No announcement yet.

Validating Account-Contact-Opportunity Relationships in Sales Processes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validating Account-Contact-Opportunity Relationships in Sales Processes

    Hello Developers,
    In my sales processes involving Sales Quotes, Sales Orders, and Sales Invoices, There is relationships with three entities: Contacts, Opportunities, and Accounts.
    Specifically, within the "Accounts" entity, there exists a One-to-Many relationship with the "Opportunity" entity. Additionally, there is a Many-to-Many relationship between the "Contacts" entity and the aforementioned entities.
    When creating or editing Sales Quotes, Sales Orders, or invoices within the sales pack, we made mandatory that fields related to Contacts, Opportunities, and Accounts are all filled out. Consequently, all required fields are selected during this process. Now, I have a specific requirement. Prior to creating or saving a record, I need to implement a condition check through a "before save" API. This condition check pertains to verifying whether the selected Contacts and Opportunities are associated or linked with the chosen Account. In essence, the selected Opportunities and Contacts should be interconnected or linked in some way with the selected Account.
    If, during this verification process, it is determined that the selected Contacts and Opportunities are not linked with the chosen Account, an error must be generated, preventing the record from being saved.
    Your assistance in achieving this functionality would be greatly appreciated.
    Thank you.


Working...
X