function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
monkeymonkey 

Contracts and Approvals

I'm trying to develop a tool that uses salesforce's contracts. However what I need to do is have this tool automatically approve contracts. I've tried by setting only the status field to be an in approval process status but I keep getting an "invalid status" message when trying to update the contract.

Can anybody shed some light on how to accomplish this? I looked into the approval object as well but it doesn't seem to have a pointer to the contract and I'm trying to avoid sending unneeded email messages out to users that don't need them.
DevAngelDevAngel

Hi monkey,

To activate a contract you need to create an approval with a status of Approved and the ParentId = to the contract Id.  Once this is create, you can then update the contract to have a status of "Activated" which will activate the contract.

CI GURUCI GURU
Hey Monkey - did you ever create this tool? Looking for something like this to use here.

Thanks,
monkeymonkey
Unfortunately I never got around to building this tool. We came up with a method where by we used the approval process instead of trying to bypass it.