How to add records in Custom activity in CRM

194 views Asked by At

I have created a custom activity in CRM. I do not want to show it in any menu, so I unchecked the checkbox. Now I am trying to create a record of this activity type from my C# code.

When I execute the code it runs, but nothing gets added in 'Activities' grid in CRM.

BookOffers bookOffer = new BookOffers();
                bookOffer.ActivityId = Guid.NewGuid();
                bookOffer.Subject = customer.Id;

                bookOffer.RegardingObjectId = args.Campaign.ToEntityReference();

 context.AddObject(productOffer);
                context.SaveChanges();

Am I missing anything else ?

0

There are 0 answers