Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

c# set configuration page for publisher

$
0
0

Hello all,

I have created a publisher and upload web resource successfully now want to set configuration page for publisher.

some sample code

//Define a new publisher
Publisher _crmSdkPublisher = new Publisher
{
UniqueName = "sdksamples",
FriendlyName = "Microsoft CRM SDK Samples",
SupportingWebsiteUrl = "msdn.microsoft.com/.../default.aspx",
CustomizationPrefix = "sample",
EMailAddress = "someone@microsoft.com",
Description = "This publisher was created with samples from the Microsoft Dynamics CRM SDK"

};

//Does publisher already exist?
QueryExpression querySDKSamplePublisher = new QueryExpression
{
EntityName = Publisher.EntityLogicalName,
ColumnSet = new ColumnSet("publisherid", "customizationprefix"),
Criteria = new FilterExpression()

};

querySDKSamplePublisher.Criteria.AddCondition("uniquename", ConditionOperator.Equal, _crmSdkPublisher.UniqueName);
EntityCollection querySDKSamplePublisherResults = _serviceProxy.RetrieveMultiple(querySDKSamplePublisher);
Publisher SDKSamplePublisherResults = null;

//If it already exists, use it
if (querySDKSamplePublisherResults.Entities.Count > 0)
{
SDKSamplePublisherResults = (Publisher)querySDKSamplePublisherResults.Entities[0];
_tempPublisherId = (Guid)SDKSamplePublisherResults.PublisherId;
_tempCustomizationPrefix = SDKSamplePublisherResults.CustomizationPrefix;
}
//If it doesn't exist, create it
if (SDKSamplePublisherResults == null)
{
_tempPublisherId = _serviceProxy.Create(_crmSdkPublisher);
_tempCustomizationPrefix = _crmSdkPublisher.CustomizationPrefix;
_publisherCreated = true;
}

.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>