Default contract in case form

ram prasad
Tera Contributor

Greetings All,

I have requirement to set one of active contract as default at the time of case creation.

In my case form I have field called contract, which is getting automatically filled by system with one of active contract.

I just wanted to know how it is getting pickup in active contract list under account and also I want to set a particular contract as default so whenever case got created default one gets filled.

 

Thank you

1 REPLY 1

MattCD
Tera Contributor
  • OOB the business rule "Populate company for case" calls script include CSManagementUtils
  • The contract is auto populated by the line
    var contract = new global.CSManagementUtils().getContractForAccount();
  •  This script include gets first contract found that is associated to the account
  • It will then check if there is contract associated to the asset set on the case and change the contract to this.

To prevent this, you can

  • Comment out the offending line in the business rule
  • Update line 9 to exclude your table class
	if (!gs.nil(current.account) && gs.nil(current.contract) && !current.sys_class_name='yourtableClass')
		setCaseContract(current)​