12 Eylül 2014 Cuma

Entity Name and Type Code Reference

Entity name Value
unknown 0
Account 1
AccountLeads 16
ActivityMimeAttachment 1001
ActivityParty 135
ActivityPartyRollupByAccount 4603
ActivityPartyRollupByContact 4604
ActivityPointer 4200
Annotation 5
AnnualFiscalCalendar 2000
Appointment 4201
AttributeMap 4601
BulkImport 4407
BulkOperation 4406
BulkOperationLog 4405
BusinessUnit 10
BusinessUnitMap 6
BusinessUnitNewsArticle 132
Calendar 4003
CalendarRule 4004
Campaign 4400
CampaignActivity 4402
CampaignActivityItem 4404
CampaignItem 4403
CampaignResponse 4401
Commitment 4215
Competitor 123
CompetitorAddress 1004
CompetitorProduct 1006
CompetitorSalesLiterature 26
ConstraintBasedGroup 4007
Contact 2
ContactInvoices 17
ContactLeads 22
ContactOrders 19
ContactQuotes 18
Contract 1010
ContractDetail 1011
ContractTemplate 2011
CustomerAddress 1071
CustomerOpportunityRole 4503
CustomerRelationship 4502
Discount 1013
DiscountType 1080
DocumentIndex 126
Email 4202
EntityMap 4600
Equipment 4000
Fax 4204
FilterTemplate 30
FixedMonthlyFiscalCalendar 2004
ImportConfig 4408
Incident 112
IncidentResolution 4206
IntegrationStatus 3000
InternalAddress 1003
Invoice 1090
InvoiceDetail 1091
KbArticle 127
KbArticleComment 1082
KbArticleTemplate 1016
Lead 4
LeadAddress 1017
LeadCompetitors 24
LeadProduct 27
Letter 4207
License 2027
List 4300
ListMember 4301
MonthlyFiscalCalendar 2003
Opportunity 3
OpportunityClose 4208
OpportunityCompetitors 25
OpportunityProduct 1083
OrderClose 4209
Organization 1019
OrganizationMap 7
OrganizationUI 1021
PhoneCall 4210
PluginType 4602
PriceLevel 1022
PrincipalObjectAccess 11
Privilege 1023
PrivilegeObjectTypeCodes 31
Product 1024
ProductAssociation 1025
ProductPriceLevel 1026
ProductSalesLiterature 21
ProductSubstitute 1028
QuarterlyFiscalCalendar 2002
Queue 2020
QueueItem 2029
Quote 1084
QuoteClose 4211
QuoteDetail 1085
RelationshipRole 4500
RelationshipRoleMap 4501
Resource 4002
ResourceGroup 4005
ResourceSpec 4006
Role 1036
RolePrivileges 12
RoleTemplate 1037
RoleTemplatePrivileges 28
SalesLiterature 1038
SalesLiteratureItem 1070
SalesOrder 1088
SalesOrderDetail 1089
SavedQuery 1039
SemiAnnualFiscalCalendar 2001
Service 4001
ServiceAppointment 4214
ServiceContractContacts 20
Site 4009
StatusMap 1075
StringMap 1043
Subject 129
Subscription 29
SystemUser 8
SystemUserLicenses 13
SystemUserPrincipals 14
SystemUserRoles 15
Task 4212
Team 9
TeamMembership 23
Template 2010
Territory 2013
UnresolvedAddress 2012
UoM 1055
UoMSchedule 1056
UserFiscalCalendar 1086
UserQuery 4230
UserSettings 150
WFAction 1061
WFActionLog 1062
WFCondition 1064
WFEventLog 1065
WFEventQueue 1092
WFParameter 1066
WFProcess 121
WFProcessInstance 122
WFRule 1067
WFRuleLog 1068
WFStep 1069

3 Temmuz 2014 Perşembe

CRM 2011 Javascript - Form Disabled

function onLoad()
{
    disableFormFields(true);
}

function disableFormFields(onOff)
{
    Xrm.Page.ui.controls.forEach(function (control, index)
    {
        if (doesControlHaveAttribute(control))
        {
            control.setDisabled(onOff);
        }
    });
}

function doesControlHaveAttribute(control)
{
    var controlType = control.getControlType();
    return controlType != "iframe" && controlType != "webresource" && controlType != "subgrid";
}

26 Haziran 2014 Perşembe

CRM - Object address not found on party or party is marked as non-emailable

When you want to send an email using CRM, you may use direct method to send email or you may use SendEmailFromTemplateRequest. And sometimes you may get the error "Object address not found on party or party is marked as non-emailable". Once you debug and found the error, you will be differently know that either the email address of 'To' is blank or marked as 'No Email' or 'No Bulk Email'. But when if fields are set correctly, and if you get the same error, once shall we do?

Other than the To Address, you have to check the 'From' users email validity as well(which we usually forget to set), because if it is missing, you will get the same error 'Object address not found on party or party is marked as non-emailable'

And what will happen if the From field is blank? Then CRM conside From user as execution context user. (May be plugin executer in Plugin Context or executer in CRM Async Service for workflows or the credentials you used to communicate with CRM Service.) And if the email address of this user is missing, you will get the same error. "Object address not found on party or party is marked as non-emailable"

16 Haziran 2014 Pazartesi

CRM 2011 - 2013 - Eklenen Dosya için Maximum Boyut Tanımlama( Setting the Maximum File Size limits for attachments)

Crm üzerinde not eklerken bazen buyuk boyutlu dosya sectıgınızde hata alacaksınız.
(The attachment is too large)
CRM de dosya boyutu default  5.192 mb olarak gelmektedir.Biz bu sorunu ekleyecegimiz dosya byutundan fazla vererek hatayı gidermiş oluruz.

  1. Go to Settings -> Administration - Ayarlar
  2. Click on System Settings - Sistem Ayarları
  3. Click on E-mail tab -Email 
  4. Go to the bottom, on the section 'Set file size (in kilobytes)' - Ekler için dosya boyutu ekleme
  5. Replace current value with  "8,192" - 8192 (8 mb)









28 Mayıs 2014 Çarşamba

CRM 2011 - ParticipationTypeMask Değerleri

Activity party typeValueDescription
Sender- From
1
Specifies the sender.
ToRecipient - To
2
Specifies the recipient in the To field.
CCRecipient -CC
3
Specifies the recipient in the Cc field.
BccRecipient -BCC
4
Specifies the recipient in the Bcc field.
RequiredAttendee
5
Specifies a required attendee.
OptionalAttendee
6
Specifies an optional attendee.
Organizer
7
Specifies the activity organizer.
Regarding
8
Specifies the regarding item.
Owner
9
Specifies the activity owner.
Resource
10
Specifies a resource.
Customer
11
Specifies a customer.
Partner
12
Specifies a partner.

14 Nisan 2014 Pazartesi

CRM 2011 - Global OptionSet Değer Ekleme, Güncelleme, Silme ve Sıralama - C#

Yeni Seçenek Ekleme

Aşagıdaki örnek kod parcacıgı InsertOptionValueRequest classı kullanılarak global option sete nasıl yeni bir secenek eklenecegini gösterir.


Örnek Kullanım:

Secenek Texti Güncelleme

Aşagıdaki örnek kod parcacıgı UpdateOptionValueRequest classı kullanılarak global option setteki bir degerin textinin güncellenmesini gösterir.

Secenek Silme

Aşagıdaki örnek kod parcacıgı DeleteOptionValueRequest classı kullanılarak global option setteki bir degerin nasıl silinecegini gösterir.

Seçenek Sıralama

Aşagıdaki örnek kod parcacıgı OrderOptionRequest classı kullanılarak global option setteki degerlerin textine göre sıralanmasını saglar.

Option Set Retrieve





8 Nisan 2014 Salı

CRM 2011 - Opportunity Note Tabı Gizleme-(ODataQuery)

Opportunity altına eklenen bir not (annotation) varsa notes tabını görünür yapan ,eğer opportunity e ait daha önceden girilen bir not yoksa bu tabı gizleyen script aşagıdadır.

Burada sorgumuzu odataquery ile olusturduk.
ODataRetrieveMultipleAjax : Sorgu larımızı calıstıracagımız metot.

/*Gökhan Mentese-gkhnmnts@gmail.com*/
function NoteTabVisibleInOpportunity() {
    try {
        var entityid = GetEntityId();
        var formType = Xrm.Page.ui.getFormType();
        if (formType == 1) {
            Xrm.Page.ui.tabs.get("notetabopportunity").setVisible(false);
        }
        else {
            if (entityid != null) {
                var query = "AnnotationSet?$filter=ObjectId/Id eq guid'" + ConverttoStringFromGuid(entityid) + "'";
                var noteEntity = ODataRetrieveMultipleAjax(query);
                if (noteEntity != null && noteEntity.results != null && noteEntity.results.length != null && noteEntity.results.length != 0) {
                    Xrm.Page.ui.tabs.get("notetabopportunity").setVisible(true);
                }
                else {
                    Xrm.Page.ui.tabs.get("notetabopportunity").setVisible(false);
                }
            }
        }
    } catch (e) {
        alert("Function NoteTabVisibleInOpportunity() \n" +e.message);
    }
}

function ODataRetrieveMultipleAjax(oDataSelect) {
    var crmOrgSvc = GetCrmSvc();
    var result = null;

    oDataSelect = crmOrgSvc + oDataSelect;
    jQuery.support.cors = true;

    $.ajax({
        type: "GET",
        contentType: "application/json; charset=utf-8",
        datatype: "json",
        url: oDataSelect,
        async: false,
        beforeSend: function (XMLHttpRequest) {
            //Specifying this header ensures that the results will be returned as JSON.
            XMLHttpRequest.setRequestHeader("Accept", "application/json");
        },
        success: function (data, textStatus, XmlHttpRequest) {
            if (data != null && data.d != null) {
                result = data.d;
            }
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert("Status: " + textStatus + "; ErrorThrown: " + errorThrown, "Error Function:" + "ODataRetrieveMultipleAjax");
        }
    });
    return result;
}

function GetCrmSvc() {
    //return GetClientUrl() + "/xrmservices/2011/OrganizationData.svc/";
    return Xrm.Page.context.prependOrgName("/xrmservices/2011/OrganizationData.svc/");
}
function GetEntityId() {
    return Xrm.Page.data.entity.getId();
}