Download the plugin registration source code:
https://docs.google.com/file/d/0B0By9PBv_3cDOXdzc19xeThRaWs/edit
https://docs.google.com/file/d/0B0By9PBv_3cDOXdzc19xeThRaWs/edit
DECLARE @Year char(4), @iValue TINYINT, @Month tinyint --//Populate your parameter values SET @Year = '2018'; select * into #temptest from ( SELECT DATEPART(wk,DATEADD(wk,t2.number,@Year)) as Weeknumb,( SELECT DATENAME(month, DATEADD(month, month(DATEADD(wk,t2.number,@Year + '/01/01')), -1 ))) AS Month FROM master..spt_values t2 WHERE t2.type = 'P' AND t2.number <= 255 AND YEAR(DATEADD(wk,t2.number,@Year))=@Year) as T select 'Week-' + convert(varchar(50), ROW_NUMBER() OVER( ORDER BY Weeknumb)) as Week, Weeknumb,Month from #temptest where Month='April'
DECLARE @Year char(4), @iValue TINYINT, @Month tinyint --//Populate your parameter values SET @Year = '2018'; SELECT DATEPART(wk,DATEADD(wk,t2.number,@Year)) as Weeknumb,( SELECT DATENAME(month, DATEADD(month, month(DATEADD(wk,t2.number,@Year + '/01/01')), -1 ))) AS Month FROM master..spt_values t2 WHERE t2.type = 'P' AND t2.number <= 255 AND YEAR(DATEADD(wk,t2.number,@Year))=@Year
|
Frame work version
|
Version number
|
|
.Net 4.6.2
|
KB3151864
|
|
.Net 4.6.1
|
KB3102467
|
|
|
|
|
|
|
// Set the target entity (i.e.,Contact)
initialize.TargetEntityName = “contact”;
// Create the EntityMoniker of Source (i.e.,Account)
initialize.EntityMoniker = new EntityReference(“account”, new Guid(“D4CBEE74-B5E3-E611-8109-C4346BDD8041”));
// Execute the request
InitializeFromResponse initialized = (InitializeFromResponse)orgService.Execute(initialize);
// Read Intitialized entity (i.e.,Contact with copied attributes from Account)
if (initialized.Entity != null)
{
// Get entContact from the response
Entity entContact = initialized.Entity;
// Set the additional attributes of the Contact
entContact.Attributes.Add(“firstname”, “Rajeev”);
entContact.Attributes.Add(“lastname”, “Pentyala”);
// Create a new contact
orgService.Create(entContact);
Thanks to Rajeev, please find URL below to the original post