web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Auto Renew Contract via workflow/email received CRM 2015/16

(0) ShareShare
ReportReport
Posted on by 160

Hi l, hope you are all well.

Could anyone advise if it is possible to renew a contract automatically?  Ideally from receiving a return email with a tracking token and contract ID in the subject header.

I have the email being returned to the correct contract and showing in the contract activities  but am now  at a loss as to how to renew the contract.

I understand that when you manually renew a expired contract a new one is created and this retains the same Contract ID and auto populates the start/end date etc. This is what I want to happen ... just don't want any manual intervention.

Any help would be appreciated.

Vanessa

*This post is locked for comments

I have the same question (0)
  • Alessandro Graps Profile Picture
    2,664 on at

    Hi,

    yes you can: I would do in this way:

    Create an workflow when Email is receive. In this workflow I use a custom activity workflow (CAW): this CAW I check if the email contains the tracking token and Contract ID and if it contained, I reopen a contract and set the new date. The process is :

    Workflow in Email

    CAW to check the content and set data and renew contract (c#)

    What do you think?

    Thanks

    A.G.

  • Vanessa Souter Profile Picture
    160 on at

    Hi, thank you for your response.

    yes  I have already created the workflow to check the tracking token and Contract ID but how do you set date and renew ?

    I have tried updating the contract status , creating a new contract which matches the original but nothing happens apart from the return email landing in the correct contract.

    in anticipation Vanessa

  • Suggested answer
    Alessandro Graps Profile Picture
    2,664 on at

    Hi Vanessa,

    to reopen a contract in CRM you need to use RenewContractRequest

    RenewContractRequest req = new RenewContractRequest();

    req.IncludeCanceledLines = true;

    req.ContractId = new Guid("GUID Contract");

    //must be a valid draft status reason

    req.Status = 1;

    RenewContractResponse resp = (RenewContractResponse)service.Execute(req);

    and after you can update with the new date.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans