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)
Active Discussion

Unable to create activity using CreateNewActivityEntry of CrmServiceClient

(0) ShareShare
ReportReport
Posted on by

Hi,

 In one of my project when I want to create a activity  using CreateNewActivityEntry method of  CrmServiceClient. I am unable to create

it but it will not get error and return only empty guid.

The code is 

-------------------------

caseResponseActivity = AppConfigSettings.CaseReponseActivity;

var caseResponseActivityType = CRMServiceHelper.GetOptionSetValueLabel("activitypointer", "activitytypecode", service).Where(c => c.Value == caseResponseActivity).Select(e => (KeyValuePair<int, string>?)e).FirstOrDefault();

if (caseResponseActivityType != null)

{

  crmResponseActivity.ActivityId = service.CreateNewActivityEntry(caseResponseActivityType.Value.Value

, "incident", crmResponseActivity.CRMCaseId, crmResponseActivity.Subject,

crmResponseActivity.Description, "IT.test@tp.eu");

}

 

*This post is locked for comments

  • Rawish Kumar Profile Picture
    13,758 on at

    Hi Rajnish,

    Did you debug the code to see what is going wrong.

    Also please check if you are able to retrieve organization service without any issue - because generally this happens if your organization service itself is null.

  • Community Member Profile Picture
    on at

    Hi Rawish,

     I am able to create incident(case) .but when I try to create activity using CreateNewActivityEntry it will return null. Is I am wrongly pass any parameter values in it. Kindly provide some example of it.

  • gdas Profile Picture
    50,091 Moderator on at

    Hi Rajnish ,

    Could you please try to debug the code and also it will be helpful if you share what you did in below method

    CreateNewActivityEntry

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)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans