28 Şubat 2010 Pazar
Helpful JavaScript Codes - Episode 1
Let’s assume that you have a readonly field and you want set that field’s value programatically; it’ll not save (if you don’t write code below):
crmForm.all.new_customfield.ForceSubmit = true;
When you modify a form and try to close without saving, you’ll see an irritating popup, to avoid that popup:
crmForm.detachCloseAlert();
If you want to run a javascript code; just after saving a new record (not for existing records), following code can help you:
if(window.history.length > 0)
{
alert("Reopened");
}else
{
alert("First time");
}
Maximize form:
window.moveTo(0,0);
window.resizeTo(screen.availWidth, screen.availHeight);
OnChange event get fired when you leave that field, If you want to run a function when you focused that field:
crmForm.all.new_customfield.onfocusin = function() {
alert("Received focus");
}
Evladiyelik Javascript - Bölüm 1
Diyelim ki bir readonly fieldiniz var ve siz javascript ile bu field'in degerini güncellediniz, siz kaydetmek istediniz ama CRM kabul etmedi. (Tabi aşagıdakini yazmaz iseniz):
crmForm.all.new_customfield.ForceSubmit = true;
Bir kayıt açtınız bazı alanları güncellediniz yada onLoad anında otomatik olarak bazı field'ler güncellendi, kaydetmeden kapatmak istediniz ve istenmeyen popup gördünüz, o halde:
crmForm.detachCloseAlert();
Form yüklenirken çalışmasınız istediginiz bir kod var ancak bu kodu yeni bir kayıt oluşur oluşmaz; form yüklenirken çalışsın istiyorsunuz, var olan bir kaydı açarken degil:
if(window.history.length > 0)
{
alert("Reopened");
}else
{
alert("First time");
}
Kaplasaa la ekranı:
window.moveTo(0,0);
window.resizeTo(screen.availWidth, screen.availHeight);
OnChange olayı siz bir alanı terk ederken çalışır eğer ki o alan tıklanınca çalışsın istiyorsanız:
crmForm.all.new_customfield.onfocusin = function() {
alert("Received focus");
}
31 Ocak 2010 Pazar
Why nothing is working ?!
You are trying to run a custom application which talks to CRM webserivce but it's throwing exception like "Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthentica-tionProvider,Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist" than don't worry.
One single dll can fix all your problems. Find "Microsoft.Crm.WebServices.dll" from somewhere (start searching from CRM server itself) Did you find it?Cool. Type "assembly" to Run window and check GAC. The thing that you should do is drag&drop this dll to GAC window. Let it copy the dll. Restart the IIS and thank.
2 kişinin bildiği sır degildir.
CRM webservis'iyle münasebeti olan bir uygulaman mı var? Çalıştırmaya kalkınca şu hatayı mı alıyorsun "Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthentica-tionProvider,Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist" o zaman korkma hacı, ilacı var.
Bildigin tek bir dll seni iyi eder. "Microsoft.Crm.WebServices.dll" diye bi dosya var sagdan soldan biyerden bul bunu, aramaya server'dan başla, buldun mu?helal. O her bogumunda kıl olan parmaklarınla Run penceresinde "assembly" yaz da GAC'ı bi görelim. Şimdi o buldugun dosyayı GAC penceresinin üzerine sürükleyip bırak. Bi de IIS reset çak, saol desene !
Etiketler:
31bf3856ad364e35,
error,
microsoft crm,
webservice
30 Aralık 2009 Çarşamba
CRM Customization BackUp Tool
If you are a member of development team I'm sure your friends or maybe you will overwrite CRM customizations; Means,someone will lose customization, or let's say you have to revert customizations back to 1 month ago.
You can use "CRMUtilities-CustomizationBackUp" plugin to get backup of current customizations before importing new one. Once you register this plugin and try to import a customization system will export all current customizations to local folder, so you'll have all versions of customizations.
Download the file which contains required Dll and ReadMe.doc
Customization kaybetmeye son:
Takım arkadaşlarınız sizin özelleştirmelerinizi mi eziyor yada siz güncellemelerinizi unutup kendi customization dosyalarını mı eziyorsunuz, hiç olmadı belirli bir tarihteki customization'lara dönmek mi istiyorsunuz. İşte size CustomizationBackUp plugini.
Yeni herhangi bir özelleştirme yüklemek istediginizde sistem otomatik olarak mevcut tüm özelleştirmeleri belirli bir konuma kopyalar, böylece tüm customization geçmişine sahip olursunuz.
Dosyayı Indir, gerekli Dll ve BeniOku içindedir.
You can use "CRMUtilities-CustomizationBackUp" plugin to get backup of current customizations before importing new one. Once you register this plugin and try to import a customization system will export all current customizations to local folder, so you'll have all versions of customizations.
Download the file which contains required Dll and ReadMe.doc
Customization kaybetmeye son:
Takım arkadaşlarınız sizin özelleştirmelerinizi mi eziyor yada siz güncellemelerinizi unutup kendi customization dosyalarını mı eziyorsunuz, hiç olmadı belirli bir tarihteki customization'lara dönmek mi istiyorsunuz. İşte size CustomizationBackUp plugini.
Yeni herhangi bir özelleştirme yüklemek istediginizde sistem otomatik olarak mevcut tüm özelleştirmeleri belirli bir konuma kopyalar, böylece tüm customization geçmişine sahip olursunuz.
Dosyayı Indir, gerekli Dll ve BeniOku içindedir.
30 Kasım 2009 Pazartesi
Why it's not updating owner field of record?
Because most probably you are trying to set ownerid field like:
contact.ownerid = new Owner();
contact.ownerid.type = EntityName.systemuser.ToString();
contact.ownerid.Value = [SystemUserGuid];
which is wrong.
Changing the ownership of a record is not that much easy, you should call another CrmService method, so here is the solution:
SecurityPrincipal securityPrincipal = new SecurityPrincipal();
securityPrincipal.Type = SecurityPrincipalType.User;
securityPrincipal.PrincipalId = new Guid(newOwnerID);
TargetOwnedContact target = new TargetOwnedContact();
target.EntityId = new Guid(contactID);
AssignRequest assignRequest = new AssignRequest();
assignRequest.Assignee = securityPrincipal;
assignRequest.Target = target;
AssignResponse assignResponse = (AssignResponse)crmService.Execute(assignRequest, null, null); //CRMWebServiceCall
Yani diyor ki:
Çünkü büyük ihtimalle ownerid için şöyle bir atama yapıyorsunuz:
contact.ownerid = new Owner();
contact.ownerid.type = EntityName.systemuser.ToString();
contact.ownerid.Value = [SystemUserGuid];
ki yanlış.
Bir kaydın sahibini(owner) değiştirmek o kadar kolay degildir ki bu noktada başka bir webservis çagrısı yapmak durumundasınız. Şu aşağıdaki kod blogu size fikir cerecektir:
SecurityPrincipal securityPrincipal = new SecurityPrincipal();
securityPrincipal.Type = SecurityPrincipalType.User;
securityPrincipal.PrincipalId = new Guid(newOwnerID);
TargetOwnedContact target = new TargetOwnedContact();
target.EntityId = new Guid(contactID);
AssignRequest assignRequest = new AssignRequest();
assignRequest.Assignee = securityPrincipal;
assignRequest.Target = target;
AssignResponse assignResponse = (AssignResponse)crmService.Execute(assignRequest, null, null); //CRMWebServiceCall
contact.ownerid = new Owner();
contact.ownerid.type = EntityName.systemuser.ToString();
contact.ownerid.Value = [SystemUserGuid];
which is wrong.
Changing the ownership of a record is not that much easy, you should call another CrmService method, so here is the solution:
SecurityPrincipal securityPrincipal = new SecurityPrincipal();
securityPrincipal.Type = SecurityPrincipalType.User;
securityPrincipal.PrincipalId = new Guid(newOwnerID);
TargetOwnedContact target = new TargetOwnedContact();
target.EntityId = new Guid(contactID);
AssignRequest assignRequest = new AssignRequest();
assignRequest.Assignee = securityPrincipal;
assignRequest.Target = target;
AssignResponse assignResponse = (AssignResponse)crmService.Execute(assignRequest, null, null); //CRMWebServiceCall
Yani diyor ki:
Çünkü büyük ihtimalle ownerid için şöyle bir atama yapıyorsunuz:
contact.ownerid = new Owner();
contact.ownerid.type = EntityName.systemuser.ToString();
contact.ownerid.Value = [SystemUserGuid];
ki yanlış.
Bir kaydın sahibini(owner) değiştirmek o kadar kolay degildir ki bu noktada başka bir webservis çagrısı yapmak durumundasınız. Şu aşağıdaki kod blogu size fikir cerecektir:
SecurityPrincipal securityPrincipal = new SecurityPrincipal();
securityPrincipal.Type = SecurityPrincipalType.User;
securityPrincipal.PrincipalId = new Guid(newOwnerID);
TargetOwnedContact target = new TargetOwnedContact();
target.EntityId = new Guid(contactID);
AssignRequest assignRequest = new AssignRequest();
assignRequest.Assignee = securityPrincipal;
assignRequest.Target = target;
AssignResponse assignResponse = (AssignResponse)crmService.Execute(assignRequest, null, null); //CRMWebServiceCall
Etiketler:
microsoft crm,
owner,
SecurityPrincipal,
update owner
Kaydol:
Kayıtlar (Atom)