28 Ekim 2009 Çarşamba
Attach External JavaScript File
I'm sure you have common functions that you are using in many entity's javascript part(onLoad,onChange,onSave). Actually the best inheritance is not copy-paste so you can keep all those functions in one *.js file and while form is loading you can attach to form with the following way.
var script = document.createElement('script');
script.language = 'javascript';
script.src = '/CustomScripts/MyCustomJavascriptFile.js';
document.getElementsByTagName('head')[0].appendChild(script);
script.onreadystatechange = function()
{
if (this.readyState == 'complete' || this.readyState == 'loaded')
{
//You can call your functions here.
}
}
We will be adding some useful functions to this javascript file on next posts.
Televizyonunu yeni açan seyircilerimiz için:
Yapmayın. Öyle bir fonksiyonu lazım olan her entity için sürekli kopyala yapıştır yapmayın, ayıp. Insan gibi bir base javascript dosyanız olsun; gerekli, en az 2 defa kullanılmış fonksiyonları bu dosyada toplayın sonra hangi entity'den istiyorsanız onun pageLoad fonksiyonuna aşagıdaki blog'u yazın, bitsin.
var script = document.createElement('script');
script.language = 'javascript';
script.src = '/CustomScripts/MyCustomJavascriptFile.js';
document.getElementsByTagName('head')[0].appendChild(script);
script.onreadystatechange = function()
{
if (this.readyState == 'complete' || this.readyState == 'loaded')
{
//şimdi burdan paşa paşa çagır fonksiyonunu.
}
}
Sonraki postlarda "işe yarar, ooo helal, yok artık" şeklindeki fonksiyonları ekleyecegiz.
26 Eylül 2009 Cumartesi
Refresh Queue
Don't you want to refresh queue. One of my client was asking this kind of solution. Their complaint was: Even if a new record assigns to queue, they are not able to see that, if they don't click queue or refresher button again. Why it's not like Outlook. Yes, it's really a big deal!
Anyway here is the code for this big problem. I'm posting it because, you may face with this kind of people as well.
We are going to edit "home_workplace.aspx" which is under "Microsoft Dynamics CRM\CRMWeb\Workplace" folder.
add this two javascript function in to script section of page.
function RefreshPage() {
crmGrid.Refresh();
}
function Refresher() {
setInterval('RefreshPage()', 30000 );
}
and add this line in to "function window.onload()" function
Refresher();
so at the and it'll be like this
function window.onload() {
HandleBackButtonIssues("workplace");
<%
if (CurrentUser.WorkplaceStyle == Microsoft.Crm.Caching.WorkPlaceStyles.Sales) {
Response.Write("resetMenuItems(MENU_DEL_ASSIGN);");
}
else {
Response.Write("resetMenuItems(MENU_ALL);");
}
%>
Refresher();
}
function RefreshPage() {
crmGrid.Refresh();
}
function Refresher() {
setInterval('RefreshPage()', 30000 );
}
Now on; it'll update the queue list in every 3seconds(or it's up to you).
Buradan açınız:
Kuyrukta listelenen kayıtların otomatik güncellenmesini istemez misiniz? Müşterimden biri bu tarz bir çözüm arıyordu. Şikayetleri şöyleydi ki: Baktıkları kuyruga yeni bir kayıt atanmış olsa dahi, eger yenile butonuna tıklamaz yada o kuyruga yeniden girmezlerse yeni gelen kaydı göremiyorlarmış. Neden Outlook gibi değilmiş. Cidden büyük sorun!
Herneyse böyle büyük bir sorun için aşagıdaki kod parçacıgından faydalanabilirsiniz. Sırf sizin de karşınıza böyle insanlar çıkabilir diye yazıyorum.
"Microsoft Dynamics CRM\CRMWeb\Workplace" klasörü altında ki "home_workplace.aspx" isimli sayfayı biraz düzenleyeceğiz.
Şu sağ elimde görmüş oldugunuz 2 fonksiyonu sayfanın javascript bölümüne ekliyoruz.
function RefreshPage() {
crmGrid.Refresh();
}
function Refresher() {
setInterval('RefreshPage()', 30000 );
}
Aşağıda bahsi geçen satırı "function window.onload()" fonksiyonun içine dahil ediyoruz.
Refresher();
sonunda ortaya şöyle bir manzara çıkıyor.
function window.onload() {
HandleBackButtonIssues("workplace");
<%
if (CurrentUser.WorkplaceStyle == Microsoft.Crm.Caching.WorkPlaceStyles.Sales) {
Response.Write("resetMenuItems(MENU_DEL_ASSIGN);");
}
else {
Response.Write("resetMenuItems(MENU_ALL);");
}
%>
Refresher();
}
function RefreshPage() {
crmGrid.Refresh();
}
function Refresher() {
setInterval('RefreshPage()', 30000 );
}
Bundan böyle, her kimki kuyruga kayıt atar en geç 3 saniyede görüle.(kaç saniye olacagı size kalmış)
Anyway here is the code for this big problem. I'm posting it because, you may face with this kind of people as well.
We are going to edit "home_workplace.aspx" which is under "Microsoft Dynamics CRM\CRMWeb\Workplace" folder.
add this two javascript function in to script section of page.
function RefreshPage() {
crmGrid.Refresh();
}
function Refresher() {
setInterval('RefreshPage()', 30000 );
}
and add this line in to "function window.onload()" function
Refresher();
so at the and it'll be like this
function window.onload() {
HandleBackButtonIssues("workplace");
<%
if (CurrentUser.WorkplaceStyle == Microsoft.Crm.Caching.WorkPlaceStyles.Sales) {
Response.Write("resetMenuItems(MENU_DEL_ASSIGN);");
}
else {
Response.Write("resetMenuItems(MENU_ALL);");
}
%>
Refresher();
}
function RefreshPage() {
crmGrid.Refresh();
}
function Refresher() {
setInterval('RefreshPage()', 30000 );
}
Now on; it'll update the queue list in every 3seconds(or it's up to you).
Buradan açınız:
Kuyrukta listelenen kayıtların otomatik güncellenmesini istemez misiniz? Müşterimden biri bu tarz bir çözüm arıyordu. Şikayetleri şöyleydi ki: Baktıkları kuyruga yeni bir kayıt atanmış olsa dahi, eger yenile butonuna tıklamaz yada o kuyruga yeniden girmezlerse yeni gelen kaydı göremiyorlarmış. Neden Outlook gibi değilmiş. Cidden büyük sorun!
Herneyse böyle büyük bir sorun için aşagıdaki kod parçacıgından faydalanabilirsiniz. Sırf sizin de karşınıza böyle insanlar çıkabilir diye yazıyorum.
"Microsoft Dynamics CRM\CRMWeb\Workplace" klasörü altında ki "home_workplace.aspx" isimli sayfayı biraz düzenleyeceğiz.
Şu sağ elimde görmüş oldugunuz 2 fonksiyonu sayfanın javascript bölümüne ekliyoruz.
function RefreshPage() {
crmGrid.Refresh();
}
function Refresher() {
setInterval('RefreshPage()', 30000 );
}
Aşağıda bahsi geçen satırı "function window.onload()" fonksiyonun içine dahil ediyoruz.
Refresher();
sonunda ortaya şöyle bir manzara çıkıyor.
function window.onload() {
HandleBackButtonIssues("workplace");
<%
if (CurrentUser.WorkplaceStyle == Microsoft.Crm.Caching.WorkPlaceStyles.Sales) {
Response.Write("resetMenuItems(MENU_DEL_ASSIGN);");
}
else {
Response.Write("resetMenuItems(MENU_ALL);");
}
%>
Refresher();
}
function RefreshPage() {
crmGrid.Refresh();
}
function Refresher() {
setInterval('RefreshPage()', 30000 );
}
Bundan böyle, her kimki kuyruga kayıt atar en geç 3 saniyede görüle.(kaç saniye olacagı size kalmış)
20 Ağustos 2009 Perşembe
Error on Entity Creation :'(
If you are getting exceptions like:
EntityService.Create caught exception: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated
ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
You should configure server's registry settings. These errors are related with Sql connection and execution timeout problem. And Oscar goes to Solution:
Create a *.reg file and register to your system:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\MSCRM]
"OLEDBTimeout"=dword:00086400
"ExtendedTimeout"=dword:01000000
Or:
To registry;
Create 2 DWord typed key "OLEDBTimeout" and "ExtendedTimeout" and set their values to "86400" and "1000000" (decimal). Reset IIS and be Happy.
Siz nasıl diyor:
Eğer ki şu şekil hatalar alıyorsanız ki bunlar “iflit” oldugum hatalardır. (iflit’I cümle içinde kullandıgım ve ingilizce tercümesini de yapmadıgım icin güçlüyüm, cesurum, hazırım.(bkz:komando))
EntityService.Create caught exception: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated
ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
Temelde bu hatalar sql bağlantıları ile ilgili. Timeout hatası alması yüzünden isteğinizi yerine getiremeyen CRM ve şu şekil bir çözümle bu soruna bir dur demektedir.
Ister aşagıda italık olarak yazdıgım kısmı *.reg file olarak kaydedin ve çift tıklamak suretiyle bırakın sisteminize nüfüz etsin:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\MSCRM]
"OLEDBTimeout"=dword:00086400
"ExtendedTimeout"=dword:01000000
Yada: Registry açılır; “HKEY_LOCAL_MACHINE > Software > Microsoft > MSCRM” altına
“OLEDBTimeout” ve “ExtendedTimeout” isminde iki Dword anahtar ve bunlara da sırasıyla “86400” ve “1000000” decimal değerleri atanır. IIS reset’I müteakip Mutlu olunur.
EntityService.Create caught exception: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated
ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
You should configure server's registry settings. These errors are related with Sql connection and execution timeout problem. And Oscar goes to Solution:
Create a *.reg file and register to your system:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\MSCRM]
"OLEDBTimeout"=dword:00086400
"ExtendedTimeout"=dword:01000000
Or:
To registry;
Create 2 DWord typed key "OLEDBTimeout" and "ExtendedTimeout" and set their values to "86400" and "1000000" (decimal). Reset IIS and be Happy.
Siz nasıl diyor:
Eğer ki şu şekil hatalar alıyorsanız ki bunlar “iflit” oldugum hatalardır. (iflit’I cümle içinde kullandıgım ve ingilizce tercümesini de yapmadıgım icin güçlüyüm, cesurum, hazırım.(bkz:komando))
EntityService.Create caught exception: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated
ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
Temelde bu hatalar sql bağlantıları ile ilgili. Timeout hatası alması yüzünden isteğinizi yerine getiremeyen CRM ve şu şekil bir çözümle bu soruna bir dur demektedir.
Ister aşagıda italık olarak yazdıgım kısmı *.reg file olarak kaydedin ve çift tıklamak suretiyle bırakın sisteminize nüfüz etsin:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\MSCRM]
"OLEDBTimeout"=dword:00086400
"ExtendedTimeout"=dword:01000000
Yada: Registry açılır; “HKEY_LOCAL_MACHINE > Software > Microsoft > MSCRM” altına
“OLEDBTimeout” ve “ExtendedTimeout” isminde iki Dword anahtar ve bunlara da sırasıyla “86400” ve “1000000” decimal değerleri atanır. IIS reset’I müteakip Mutlu olunur.
23 Haziran 2009 Salı
Customize the Queue View ?!
Kısıtlamalar yüzünden can sıkıcı bir hal alan queue'lar ve onların "Olmaz olsun" dedirten özellikleri. Müşteriler haklı olarak queue kullanmak ister, "Bunu yaparbilir miyiz? yapamayız. Bu olur mu? oluru yok.". Hayır, hiç hoş değil. Sizde benim gibi queue view'e kolon eklemek yada varsayılan sıralamayı değiştirmek isterseniz şunları yapabilirsiniz.
_MSCRM isimli CRM veritabanının tabloları arasından "MetadataSchema.Entity" isimli tablosuna gerçekleştirilecek şöyle bir update script çalıştırılır ve IIS yeniden başlatılır, böylece yeni bir aleme adım atılır.
UPDATE MetadataSchema.Entity SET IsCustomizable = 1 WHERE [Name] = 'Queueitem'
Şu andan itibaren "customize entities" bölümünde QueueItem'ları görebilir ve View'ları değiştirebilir ve yayınlayabilirsiniz.
NOT: Yayınlamalarınız bittikten sonra " IsCustomizable = 0" yapmayı ve IIS'i yeniden başlatmayı unutmayın, üzülürsünüz.
English Subtitle:
Queue's and their limited features. Clients want to use queues but for each time. "Can we implement this? No, we can't. Is it possible ? No way." which is not nice. If you want to add columns or maybe change the sort-order column for queueview you can use this solution.
Run update script which is specified below for MetadataSchema.Entity table which is in CRM database (_MSCRM ), than restart IIS and say "hi".
UPDATE MetadataSchema.Entity SET IsCustomizable = 1 WHERE [Name] = 'Queueitem'
Now on in "Customize Entities" section you will able to see "QueueItem" and you can update views and publish them.
PS: After publishment don't forget to set "IsCustomizable = 0 " and restart IIS. Otherwise you migth be sad.
UPDATE MetadataSchema.Entity SET IsCustomizable = 1 WHERE [Name] = 'Queueitem'
Şu andan itibaren "customize entities" bölümünde QueueItem'ları görebilir ve View'ları değiştirebilir ve yayınlayabilirsiniz.
NOT: Yayınlamalarınız bittikten sonra "
Queue's and their limited features. Clients want to use queues but for each time. "Can we implement this? No, we can't. Is it possible ? No way." which is not nice. If you want to add columns or maybe change the sort-order column for queueview you can use this solution.
Run update script which is specified below for MetadataSchema.Entity table which is in CRM database (
UPDATE MetadataSchema.Entity SET IsCustomizable = 1 WHERE [Name] = 'Queueitem'
Now on in "Customize Entities" section you will able to see "QueueItem" and you can update views and publish them.
PS: After publishment don't forget to set "IsCustomizable = 0 " and restart IIS. Otherwise you migth be sad.
Etiketler:
customize queue view,
microsoft crm,
queue view
Kaydol:
Kayıtlar (Atom)