Posts

Dynamics 365 - Creating a view on runtime and assign it to the subgrid lookup field

Image
Recently during one of the tasks I was doing, I came up with a problem where I had to filter a lookup on a subgrid (for example Entity2) based on a value in another lookup (for example Entity1) on a Case form. If I had to filter the lookup on a subgrid for Entity2 for Case then that feature is available out of the box. For understand the example see following screen shot: The lookup highlighted above needs to be filtered based on the value in the lookup of Entity1. Here in this example Entity1 and Entity2 are related to each other with N-N relationships. Following javascript code can be used to achieve this task. You need to call this function on form's OnLoad event. function  filterLookup() {      var  subgridAddButtonId = "Entity2_addImageButton";          //Try to get the element from both the current and the parent document.      var  subgr...

Unity brought back to Karachi

Image
Much has been said and much has been written about the PTI’s Peace convention on 25 th December 2011. I didn’t get a chance to physically go there and become the part of the history, because history was in the making. With no suspicions that gathering was one of the biggest in the history of Pakistan. I have got several reasons to stamp this event in my memories and I would surely like to tell my next generation about that as well. I personally like Imran Khan right from my childhood days. When I grew up, like any other Pakistani boy I started to love Cricket. My interest in cricket developed from the famous sixer hit by Javed Miandad and it didn’t seek for respite after that. The 1987 Pak-England series and World Cup 1987 further ignited the fire. I saw Pakistan Cricket in serious business. I on no account found that team losing hope till the last ball of the match. Win or lose didn’t matter to me a lot that time, only thing that mattered to me was the way my team fought. Soon I re...

WCF Deployment Issue

Recently I got a chance to deploy a WCF Service application on IIS 7.0. Deployment is more or less similar as a normal ASP.Net deployment, so I followed the same procedure. But when I tried to run service.svc file in the web browser it threw an error HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. This is the thing you need to care about; handler is missing in this case. So you need to add the handlers for the svc content type. Here is the process for that: Applicable for IIS 7.0: Open IIS Manager MMC snap-in. In the left pane, expand the node with the computer's name, then expand the Web Sites node, and then select the Default Web Site . Double-click Handler mappings in the Features View . In the list of application mappings, verify that the .svc file is mapped to the aspnet_isapi.dll. If th...

Application Pools in IIS

Application Pools in IIS Application pool is one of the features in IIS, that can be used to meet various requirements. Application pool in IIS is a group of one or more web directory or visual directory. They can be utilized to host one or more different web applications. Every application pool is served by a worker process or set of worker processes. Every web application in an app pool shares a same worker process. Worker process is a windows process. The main function of worker process is to handle requests sent to IIS for a specific application pool and that’s why one worker process can be associated to a single app pool. The name of the worker process executable is w3wp.exe and for every app pool IIS creates a separate instance of w3wp.exe. Benefits: There could be following benefits of creating application pools: To maintain the confidentiality between different web applications. Isolation of web applications in an application pool ensures that problem in one ...

Social Responsibility

Image
Societal behaviors are always thorny to style to some other forms. These are the collective behaviors possess by the masses and its espousal takes years. The society we are living in also has communal set of behaviors, few of them are good for the society and some are not. Among those behaviors which are not good for the society one is the habit of producing extensive rubbish. Despite the existence of the trash cans in the streets, parks and other public places, amount of rubbish have amplified by immense deal. There are numerous reasons glued to it. One big reason in my belief is the enlarged usage of packaged items. On daily basis we purchase lots of packaged items. For instance grocery items, from meat to vegetable and from garments to footwear, all the items are packed in plastic packing. After unpacking the items for usage, we get huge pile of rubbish in the form of the packing material. We normally don’t dispose of that packing material properly. Specially while travelling we ju...

Stranded at the Gun Point

Last Friday i.e. 1st May 2009, when entire country was commemorating the International Labor Day, I was also on holiday from the office. As it was Friday so like every other Muslim I also observed Jumma Prayers. When I was returning from the mosque in my car, I had to acquire the right twist to enter a lane. There I found two cars ahead of me. The front car was Black Toyota Corolla which took a right turn and behind that there was another car which was Silver Suzuki Cultus. I was in the making for the Cultus to take right turn so that I could take the same. But the driver of that car was moving very slowly, I had no intention to wait for him so I tried to over take him, which I did successfully. Just a second after taking the right turn, I realized the driver of that car was pumping the horn in some unusual way. The touch of anger was prominent in that, he stopped his car in front of my car and stepped out with a gun in his hand. He came towards the driving seat and showed gun to me, h...

Gone for now and gone forever

Enough has been said and much has been on paper about this issue. The news is Pakistan no more stands in the list of hosting countries for the cricket world cup 2011. Few days ago ICC announced in its meeting that Pakistan is being eradicated from the list of hosting nations for the forthcoming cricket world cup. This decision has not only dented the hearts of cricket lovers in Pakistan but also has put a bung on any likelihood of international cricket match in Pakistan for at least 2 years. We have been watching and reading many comments, interviews and statements from different people about this verdict. Majority of them rebuked ICC for this tough decision and some of them put PCB in the firing line. But the fact to me is that the PCB itself is a biggest culprit for that. Let’s just scrutinize the security conditions in the other hosting countries. Take Srilanka first where Tamil tigers are notorious for spreading terrorism in the country. More than trice they assailed the area...