Changing the contract on a record does not cancel SLAs for the previous contract. Since the contracts control which SLAs can attach to a record, changing the contract should cancel the existing SLAs for the previous contract.

Steps to Reproduce


Build name: Berlin
Build date: 12-20-2012_1818
Build tag: glide-berlin-05-06-2012__patch5-hotfix1-12-19-2012

  1. Activate the SLA Contract Add-on.
  2. Update com.snc.sla.contract.tables to be fsm_service_order,incident.
  3. Go the SLA Definitions list (contract_sla_list.do) and open Priority 1 resolution (8 hour)
  4. Set the name to Priority 1 resolution (8 hour) #2.
  5. Right-click the header and choose Insert
  6. Navigate to ast_contract_list.do and click New
  7. Personalize Related Lists and add the SLAs related list. 
  8. When the form reloads on a new record, set Vendor to ACME Africa.
  9. Right-click the header and click Save
  10. On the SLAs related list, click Edit.
  11. Add Priority 1 resolution (8 hour)
  12. On the Contract form, right-click the header and click Insert and Stay to make a second contract with the same settings. 
  13. On the SLAs related list, click Edit.
  14. Add Priority 1 resolution (8 hour) #2
  15. Navigate to Incident > Create New
  16. Personalize the form and add the Contract and Company fields. 
  17. Back on the new Incident form, set the following values: 
    • Short Description: Test Contract 1 
    • Company: ACME Africa
    • Impact: 1 
    • Urgency: 1 
    • Priority: 1 (this calculates automatically, but takes a second) 
  18. Save the record.
    Note that no SLAs attach, because Contract is empty. Set Contract as follows: 
    • -- Contract: Pick the first contract you created 
  19. Save the record again.
    Note that the Priority 1 resolution (8 hour) SLA attaches. 
  20. Change the Contract to the other Contract you created. 
  21. Save the record.
    Note that now there are two task_sla records, one from each contract. Since Contract controls which SLAs attach, I would also expect the existing SLAs to cancel if they do not belong to the current Contract. 


The attached script is designed to run on Incident. The script cancels existing SLAs and their workflows when the contract is changed. This may need to be modified to run on the table on which this issue is occurring.

Note: This workaround will not work if a Contract is removed and then re-added.

Related Problem: PRB582780

Seen In

Berlin Patch 3 Hot Fix 1
Berlin Patch 8
Dublin EA 1
Eureka Patch 11
Eureka Patch 9 Hot Fix 1

Fixed In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2015-12-21 09:58:23