locked
creating contrat detail using SDk RRS feed

  • Question

  • Hi
    I have a requiremet where i need to update a field in Active contract .MS CRM 4.0 doesnt allow to edit an active contract. So using SDK , iam trying to create a new contract with all the attrbutes as in the exisitng contract plus additional infiormation and then activitting the new contract. I also copy the contract detail of the existing contract and create the similar contract details for new contract. The code works fine for the first time. bt again if i try to create new contract for the same exisitng contract. ,the error is thrown stating Start date is not valid while creating the contract detail(contract lines).

    Please let me mow if anyone knows the reason and how to do it
    Shilpa Sharma
    Thursday, October 1, 2009 12:54 PM

Answers

  • You need to adjust the contract detail lines to have the same activeon and expireson date as the contract if it is outside the bounds of the contract.

    IE.. PSEUDO would be... if contract.activeon>contractline.activeon then contractline.activeon=contract.activeon

    We have that problem here and that is how we resolved it.  It works if they are the same or if it is less, but we have always had to do the check and correction when using the SDK to copy contract lines to a new contract.
    • Marked as answer by Jim Glass Jr Thursday, October 1, 2009 6:35 PM
    Thursday, October 1, 2009 4:03 PM

All replies

  • You need to adjust the contract detail lines to have the same activeon and expireson date as the contract if it is outside the bounds of the contract.

    IE.. PSEUDO would be... if contract.activeon>contractline.activeon then contractline.activeon=contract.activeon

    We have that problem here and that is how we resolved it.  It works if they are the same or if it is less, but we have always had to do the check and correction when using the SDK to copy contract lines to a new contract.
    • Marked as answer by Jim Glass Jr Thursday, October 1, 2009 6:35 PM
    Thursday, October 1, 2009 4:03 PM
  • Thanks a lot Jim
    Shilpa Sharma
    Friday, October 2, 2009 3:59 PM