Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to Make contact and date default for Activity on Lead and Opportunity -

Posted on by 884

Hi All,

When someone goes to make a call - the contact name should default to the Lead and Opportunity Contact Name and the date should default to the day's date. Any activity should default to the date of the day they create the activity and the contact should be the person on the record.

Thanks

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to Make contact and date default for Activity on Lead and Opportunity -

    No need for the code. you can map it from

    Go to Phone call entity and open N:1 Opportunity -Phone call relationship

    and add the mapping of contact

  • CRM Develope Profile Picture
    CRM Develope 884 on at
    RE: How to Make contact and date default for Activity on Lead and Opportunity -

    Thanks Jagmohan Singh

    Please give me code for java-scripts for how to set contact

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to Make contact and date default for Activity on Lead and Opportunity -

    Hello

    function SetDateField() {

     var BirthDate = Xrm.Page.data.entity.attributes.get("birthdate");

     var today = new Date();

     var futureDate = new Date(today.setDate(today.getDate() + 1));

     BirthDate.setValue(futureDate);

    }

    Hope it will work for you!

    Please Verify my answers.

  • CRM Develope Profile Picture
    CRM Develope 884 on at
    RE: How to Make contact and date default for Activity on Lead and Opportunity -

    Thanks Jagmohan Singh

    Yes,You are right..

    Please give me code for javascripts

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to Make contact and date default for Activity on Lead and Opportunity -

    if you are creating this Phone call from opportunity's form then you can map contact and for the date, you can code in javascript on load of phone call form

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans