Adventure, Trekking

For those who came in late… a dream comes true – Ratangad descent via Baan pinnacle (17-18 Feb 2007) – Day 2 & 3 Baan Pinnacle to Dehne


Baan towering above as we start descending towards Dehne


Baan towering above as we start descending towards Dehne

The beginning of the descent to Dehne from the Baan pinnacle base was the precursor of what lay ahead. The river bed was littered with crumbled boulders making route finding extremely difficult. While our guide (Mama) was searching for the route ahead, we noticed 3 rocks neatly arranged one above the other on a boulder. It could be nothing but a marker set by the Girivihar group that had climbed up by this route yesterday. Looking further down, we could see a series of the markers. It was the route indeed!

Our happiness would however be short-lived. A small descent and the markers deserted us. A short descent and Mama announced that we had lost the route and after a brief search he directed us into the trees on the left of the stream. It was thin trail climbing up to the ridge falling from the base of the Baan pinnacle. We traversed for some time through the forest with the trail getting thinner with every passing moment. I had estimated a maximum of 4 hours to reach Dehne. When we started from the pinnacle base it was 2 pm and I was sure to make it to the village before sunset – unless we got lost in the forest! There was also the concern about water availability. The river bed contained small pools of water which were not potable, and although we had enough water to last for the 4 hours descent, everyone was getting a bit worried with the thinning trail…

After a traverse that seemed quite long, Mama again announced that we had lost the route. In fact, the route had come to a dead-end. While Mama, Madhav & Apoorv went searching for the route, Girish & I discussed the possibility of being stranded in the forest for the night. If we were stranded, the river bed would be best choice to spend the night. We would at least get some flat & open space. To get to the river-bed would mean tracing the route backwards for about an hour, which meant we really would have no chance to make it to the village that day. At that moment, Madhav came rushing with the news that there was a route ahead & Mama had announced that the village would be three hillocks away. With renewed hopes, we started on the trail ahead to hit another dead-end some time later. This time the route had been blocked by a huge fallen tree and it was not possible to get to the other side. However, Mama located a route some 20 feet lower. It would involve sliding downwards on very loose and exposed scree to get to the route. By this time I had made up my mind to get to the village by night, so when Girish suggested going back, I refused and decided to take the plunge. It took some effort from everyone to get down, most remarkably Jayasurya!

With twilight approaching, we descended further, now steeply through firm rocks, till we reached a rock patch of around 25 feet with no way through. Mama had descended it and informed that there was a route ahead till the base of the stream. The sunset had already begun. I descended down the patch, and discovered that at the last 4 feet there were absolutely no holds – one would have to jump down! We quickly decided that we first had to get the sacks down and then descend one by one. Peter & Madhav took positions at intervals on the rock-patch & we started getting the sacks down. In the meanwhile, Mama had descended to a tree below & informed me that the base of the stream was just a little ahead. But, now our situation had worsened. It was now a race against time. With sunlight fading fast, I knew we had to get to the base of the stream fast. It took almost half an hour to get everyone down the rock-patch. By that time, the sun had made its journey down the horizon and we had to switch on our lights. Rajesh being the first to descend down the patch had made his way to the tree with two sacks. Mama made two trips to and fro and carried some sacks. This made things easy for us and saved some time in getting the entire group down to the tree. It was tough descending with a very thin trail through extremely loose scree.

As we regrouped at the tree, it was already dark. Further progress would now be very slow with the aid of torches & headlamps. As per Mama, potable water would be found at the base of the stream at a place called “Sondi” (actually what he meant was the base of the ridge), which didn’t seem far away now. But distances are always deceptive in the forest and especially in the dark. Nevertheless, we started for the Sondi. As expected, the progress was extremely slow, with Mama himself suffering from dull vision & the rest of the pack following slowly. Moreover, Mama was rendered injured in the left leg by a loose stone & Rajesh was with cramped legs. The route now wound downwards consistently through rocks, which was a big relief; the scree wouldn’t scare us anymore. After what seemed forever, we reached a wide, open & flat area within the waterfall – a welcome place. We stopped to take a bearing – the morale of the team was very low; we still hadn’t reached the base of the stream, it seemed we were heading to nowhere; we had exhausted all the water with us; however we had enough food to eke out the night. In the current circumstances, this seemed to be a good place to retire for the night. However, with no water supplies and an exhausted team, the night wouldn’t be an easy one. I was also concerned about Rajesh’s & Mama’s condition. We had to get to water, and water was at the Sondi.

Girish’s suggestion of sending a team of two to hunt for water seemed apt. Peter and I emptied two of the smallest rucksacks, packed everyone’s water bottles into them and headed into the dark below in search of potable water. Mama was walking half-blind, I suppose he had night-blindness, and I had to guide him through the rocks. Descent however was now swift as we were less in numbers. When we had descended a little, I peered into the night, saw the stream flattening & turning to the right. I strained my eyes to follow the stream ahead, and to my surprise, I realized the stream was flowing into the big waterfall coming from its right. We had reached the base of the stream and the combined river bed would lead us directly to Dehne. I knew we had made it to the Sondi as well. With hopes high now, we quickly entered the riverbed to look for pools of water. We got lucky with the second one! It contained water as clean as can be. With a flat river bed beside, there could not be a better place to camp for the night.

A splash on the face felt heavenly. Having refreshed ourselves, we set out to fetch the others. Mama was a little reluctant to go all the way up to get the others; but he had no option – he wouldn’t stay there alone with no lights. So, the three of us started climbing back with filled water bottles on our backs. A loud clang of falling metal to the left informed us that the team was having snack. In the dead of the night, the noise filled the entire valley. Earlier it would have alarmed us; now we were just too excited to get the great news back. Soon, we were with the team and having refreshed, we set out for our camping site. Slowly, we made it there and the team relaxed in no time. Girish, Peter and I debated the idea of continuing ahead immediately, however, decided against it, as the progress would be very slow in the night. Madhav, the tea-man, served hot tea & soup, and pain of the day was soon forgotten; we got into camping mood. A few of us went to sleep, as did Mama, while the rest prepared for dinner. It was 3 am in the morning when we finished; we had planned to start for the village at 6 am. It would be just 2 hours of sleep for us. I didn’t mind. We would be heading directly for Dehne in the morning – nothing else mattered. As I slid into my sleeping bag, I noticed the beautiful night sky above; the hill in the front towered above the twinkling stars in the glistening pool waters – a wonderful sight to behold. There was a slight chill in the air; just right to spend a day out in the wild. For once, I was glad we were lost. It would be a night to remember!


Almost night, in the stream at Baan base


Almost night, in the stream at Baan base

The biggest pool in the stream


The biggest pool in the stream

Camp at night near a pool within the stream


Camp at night near a pool within the stream

Everyone was up at 5 am and ready to go. The resilience in the team was amazing, a sign that everyone had enjoyed yesterday’s thrill. Twilight arrived as we started for Dehne at 6 am. Baan beckoned in the back, halfway up the Samrad plateau. We reiterated our desire to come back for a night at its base. Soon, Mama would part and take a right to go back to Samrad via the Karoli ghat. As the first rays of light struck us, we looked back to see Ratangad and Khunta towering above the Samrad plateau. We had descended around than 4000 ft from here. Ajoba started to become visible in the front. Dehne seemed a long way, and a break brought out rasgullas from Rajesh’s potli. They got devoured in no time.


On towards Dehne...Baan falling behind


On towards Dehne…Baan falling behind

Baan pinnacle - looking back


Baan pinnacle – looking back

Baan and the valley to the left through which we descended


Baan and the valley to the left through which we descended

Khutha pinnacle appears behind Baan


Khutha pinnacle appears behind Baan

Its sunrise....


Its sunrise….

As we neared Dehne, the thoughts of going back to our daily routines came flooding. That is when, Rajesh and I realized that the car would have been waiting for us since yesterday evening; our driver must be really worried by now. We picked up some speed and rushed into the village to see an anxious Rajesh’s dad at the local shop. It was easy to guess what had happened last night in our homes. We had been missing for the night, and the driver hadn’t called back; all relatives were worried and some headed to Dehne to retrieve us. We had become famous overnight (Girish, Wayne & Apoorv would receive a standing ovation back home!). Everyone assembled at the village and we knew the trek had come to an end. We would be taking back memories that would last a lifetime. But, Baan had planned to give us more. As Rajesh’s dad left in the other car, he mistakably took the keys of our car as well. By the time we realized, he already had a 15 minutes head-start. Our driver started after him by the local auto, while Rajesh and I went to the house with the only phone in the village. The phones were down, and we had to retreat back to the group. By that time, more friends had arrived to look for us with more equipment and the team had begun to cook lunch. By the time, our driver was back with the keys we had our lunch and were completely refreshed. As we drove back, memories of last night became highly animated discussions; there was a sense of achievement all over the group, indications that we had thoroughly enjoyed the trek. The plans for the next one were being made…

Quick details of the trek –
Team – Praphulla, Rajesh, Girish, Apoorv, Wayne, Madhav, Jayesh, Peter, Prajakta, Jayasurya
Date – 17th-18th February 2007

A few photos of the trek are here:
Ratangad (17-18 February 2007)
Ratangad (17-18 February 2007)

Adventure, Trekking

For those who came in late… a dream comes true – Ratangad descent via Baan pinnacle (17-18 Feb 2007) – Day 2 Ratangad to Baan Pinnacle

Morning came at 6 am with my mobile alarm waking up Rajesh. Our chai-waala (Madhav) was soon in action while the rest of the pack were getting ready for the descent.

I was still pondering over the route, when I had a word with Girivihar group leader. He recommended a descent through Karoli Ghat instead of the Baan pinnacle, as it would be easy. A little later, I made up my mind to continue with our original plans & descend through the Baan pinnacle route. As we were leaving, we were greeted by a group who had come all the way from Bangalore to climb Ratangad. They had got lost in the forest in the night & managed to make it to the top now. That explained the mystery of the moving lights in the forest in the night!!! Additionally, they had to make it back for the 9:00 pm train back to Bangalore. All that we could recommend was to make haste!


From the cave to Hanuman Darwaja


From the cave to Hanuman Darwaja

Kathra in front & Muda in the back


Kathra in front & Muda in the back

Cave at Ratangad


Cave at Ratangad

A round of Maggi and we were on the way to the Trimbak Darwaja at 9:30 am (quite late, as we had planned to leave at 8:00 am). We passed through the Hanuman Darwaja, to be greeted by the towering rock-faces of Kathra & Ajoba, massive rock walls falling steeply into the Konkan. We walked past the Rani-cha-huda, filled our water bottles at the water tanks a little ahead, and moved onto the west side of the fort. Passing the now dilapidated Konkan Darwaja, we crossed a set of neatly arranged water tanks to reach the base of the Nedhe (natural orifice in the rock face). It was at these water tanks that we got the first look at the Baan pinnacle, deep in the valley below. Peter & I sketched the route to Dehne village, which was visible in the distance; quite a long walk. A short walk along the edge of the fort through tall Karvi bushes led to the Trimbak Darwaja. The Trimbak Darwaja is the most well-preserved fortification on the fort (maybe because it receives a few visitors), with steps carved out in stone between huge enclosing walls.


Baan pinnacle seen from the way to Nedhe


Baan pinnacle seen from the way to Nedhe

Khutha pinnacle & Kalsubai in the back


Khutha pinnacle & Kalsubai in the back

Route to Samrad from Trimbak darwaja


Route to Samrad from Trimbak darwaja

Trimbak darwaja


Trimbak darwaja

Through the Trimbak darwaja


Through the Trimbak darwaja

Huge enclosing walls below Trimbak darwaja


Huge enclosing walls below Trimbak darwaja

Descent from Trimbak darwaja


Descent from Trimbak darwaja

We descended the steps, each one about a couple of feet high, traversed the fort at the base of the rock face, and reached the col between the fort & Khutha pinnacle. It is on this traverse that one falls in love with Ratangad. While the impressive Khutha pinnacle beckons in the front, a look back leaves one awe-struck at the ruggedness of the natural fort walls. The Trimbak darwaja seems to be carved out of nowhere with natural bastions surrounding it. Below one can see all the way to the Konkan plains; more than 1000 metres below. No wonder the rulers of this fort never cared to add any massive fortifications on this side; Mother Nature herself is defending the fort here! At the col, the stream leading down to the left could be seen flowing all the way to the base of the Baan pinnacle, but it seems only rain-water would be able to trek that way. We had to descend a little through the stream, take a right, traverse Khutha at its base and descend further to the Samradwadi plateau fields.


Traverse under the Ratangad rock face to the col with Khutha


Traverse under the Ratangad rock face to the col with Khutha

Looking back...


Looking back…

After the traverse at Khutha base, looking back


After the traverse at Khutha base, looking back

As I reached the other side of the Khutha pinnacle, the first glimpse of the Ghatghar valley left me enthralled. Backwaters of two dams, the 19th century Wilson dam and the 21st century Ghatghar dam could be seen reaching out to one another with the massive Kulang range towering above them. It was a treat for the eyes – the village Samrad at the base, the road leading straight ahead to Ghatghar village, the newly built dam; and above the range of lofty mountains starting with Chotta Kulang & Kulang on the left and proceeding to Madangad, Alang, Kirda to aptly culminate in the highest peaks of the Sahyadris, Kalsubai I & II. I was a little ahead of the pack when I reached here, and it seemed fit to take a little snack to make allowance for savouring the view a little more.


Kalsubai range & Ghatghar valley seen from way to Samrad...


Kalsubai range & Ghatghar valley seen from way to Samrad…

After further descent, we stood in the first Samrad field (last for the Samrad villagers) and it was a little less than 2 hours since we had left the Ratangad cave – we had been pretty fast. Now, we had to take a U-turn, and traverse back all the way to the stream (the one flowing down from the col between Ratangad & Khutha) & descend further to the base of the Baan pinnacle. Since, I didn’t know the U-turn, I was planning to go to the village Samradwadi & hire a villager to show us the way. But that would take an hour more. As luck would have it, I noticed a villager moving in the trees, and Peter having tracked him down immediately, negotiated with him to show us the way to the Baan pinnacle. Soon, we traversed back on the plateau to the stream (and we realized the villager – Mama – had different ideas of Baan pinnacle. I had to show him my photos taken from the top of Ratangad to make him understand the Baan pinnacle that we were looking out for), and were greeted with the first views of the entire Baan pinnacle a hundred feet below. The pinnacle is a straight rock pillar a few hundred feet tall, shaped like an arrow –
a threatening view.


Taking a U-turn before Samrad, Khutha in the back


Taking a U-turn before Samrad, Khutha in the back

We've reached the stream that leads to Baan pinnacle base


We’ve reached the stream that leads to Baan pinnacle base

We entered the narrow valley to be greeted by fragile rock faces on both sides echoing our voices almost 7-8 times. The rocks are extremely loose here, and we feared to talk loudly lest we might trigger a landslide. A careful descent of half-an-hour brought us to the base of the Baan pinnacle. One has to stick to the left side of the valley as the stream bifurcates at one point, and the one of the right leads to the huge waterfall of about 30-40 feet. There is a flat area at the base of pinnacle where one can pitch tents; the stream below will contain pools of water till November. The pinnacle itself is composed of loose rocks and will be a difficult climb. I lay on my back gazing at the magnificent pillar of rock. Risks had been taken and the unknown had been turned to known; our dreams had finally been realized. The valley was extremely fragile with loose rock faces on both sides, and looked spent in the aftermath of last year’s torrential rain, but mesmerizing nevertheless. I wondered how long this spectacle of nature will last. Gajar halwa was served to prepare the team for the further descent to Dehne village. This is where we were heading into the truly unknown, as even our guide had been through only once and that too more than 20 years before…(to be continued…)


Baan pinnacle - partly behind the rock face


Baan pinnacle – partly behind the rock face

View ahead as we start descending the stream


View ahead as we start descending the stream

Gang at the base of Baan pinnacle


Gang at the base of Baan pinnacle
Adventure, Trekking

For those who came in late… a dream comes true – Ratangad descent via Baan pinnacle (17-18 Feb 2007) – Day 1 Ratangad

A flurry of emotions flooded the group as we sped on the Mumbai-Nasik highway towards Igatpuri. Memories of the Ratangad to Harishchandragad marathon two years ago, played continuously on three minds, Peter, Madhav & I; for Rajesh, it had been a 15-year long wait; for others, perhaps, it was just heading out into the unknown. All of the reference books had failed to shed any light on the descent route from Ratangad via Baan pinnacle. A quick breakfast at Diamond hotel near Shahpur, and we joined the long queue in the Kasara Ghat, owing to the ghat being closed for traffic in the night for widening work. An equally long line of pilgrims to Shirdi marched besides us – their trek would cover more than 150 kms over the next week. Luckily for us, the ghat had opened & we breezed past the waiting vehicles to reach Ghoti near Igatpuri, to be caught in another traffic jam – it was time for the weekly market (every Saturday) in Ghoti. A brief retreat to another road saw us at Vaasali phata in no time, with Kalsubai towering above us and extending majestically all the way to Kulang. On the other side, the Patta range was beckoning; I promised myself to return back soon, such is the magic of the Sahyadris here.

Soon, we were having a snack at the MTDC resort at Shendi just beside the Wilson dam on the Bhandardara Lake. Rajesh & I inquired for the ferry to Ratanwadi, but there was none, so we drove all the way to Ratanwadi. The ancient Amruteshwar temple was overwhelmed by the villagers with Mahashivratri celebrations, and unfortunately rendered off-limits for us. So, we set off immediately to our destination – Ratangad. The walk outside the village had been altered a bit, with the villagers building a make-shift dam on the Pravara River.

The river now held water even in February. A Shrike, a Common Kingfisher & lots of Cormorants could be seen along the river. Criss-crossing the river we climbed the hillock in front to reach the plateau at the base of the fort. After a short climb through the forest, and leaving the Ratanwadi-Samrad route behind, we reached the Harishchandragad bifurcation.

At the Bhandardara (Wilson) dam
At the Bhandardara (Wilson) dam
Pravara river
Pravara river
Shrike
Shrike


Beautiful view of Ratangad from the fields outside Ratanwadi village
Beautiful view of Ratangad from the fields outside Ratanwadi village
Through the river
Through the river

Ignoring that route to the left, we climbed further to reach the ladders propped against the rock face below the Ganesh Darwaja of the fort. The chimney climb below the entrance had been avoided by the ladders, although the ladders themselves are decaying. The view from the ladders was mesmerizing – the Khutha pinnacle could be seen to the right with Kalsubai behind it; in the valley behind, the vast expanse of the Bhandardara Lake with Ghanchakkar rising behind it; to the left, the Agni-Baan pinnacle sticking out of the Kathra rock face. Carefully negotiating the ladders, we entered the Ganesh Darwaja & climbing a small rock patch reached the Hanuman Darwaja. Here, turning right instead of entering the fort, we passed the Ratnadevi temple & reached the cave.

Ladder propped on the chimney leading to the Ganesh darwaja
Ladder propped on the chimney leading to the Ganesh darwaja
The Ganesh darwaja, just above the ladders
The Ganesh darwaja, just above the ladders
Towards the Hanuman darwaja from the Ganesh darwaja
Towards the Hanuman darwaja from the Ganesh darwaja
From the cave to Hanuman Darwaja
From the cave to Hanuman Darwaja
The peak of Kalsubai
The peak of Kalsubai
View towards Khutha from the ladders
View towards Khutha from the ladders

At the cave, we were greeted by a group of four, who turned out to be veteran trekkers from Girivihar, and to our great surprise, they had just climbed the route from Baan pinnacle. The news from them was bad however – the route was in bad shape, had not been climbed for 2 years now and they had to cut their way through the forest to the top. I now had a decision to make, and I did the best that I could at that time – delay it for the next morning!!!

Bhandardara lake
Bhandardara lake
Khutha pinnacle & Kalsubai seen from the cave
Khutha pinnacle & Kalsubai seen from the cave
View from the top, Rani-cha-Huda on the left
View from the top, Rani-cha-Huda on the left
Kathra in front & Ghanchakkar in the back
Kathra in front & Ghanchakkar in the back

After some sandwiches & refreshments, out came the cooking equipment & within no time we had soup ready. It was night & surprisingly it wasn’t getting any cooler – Mumbai seemed to be much cool, with the rains lashing the East. Rajesh, as usual, was letting out food-stuff from his bottomless sack. Dinner was quite good, with Rajma masala, Dal fry, & rice, to be followed by a bout of Rasgullas (from Rajesh’s potli, of course). Cleaning sessions would never be more exciting with Girish & Apoorva giving lessons in astronomy (the sky was as clear as it could ever have been, shooting stars frequently zipped across, which is when we realized it was a new moon). Back in the cave, we got our beds (sleeping mats/bags) ready while the ones who missed the lessons (Rajesh, Praju & Jayasurya) went for their own session (coming back they would fight with Girish for the position of the Scorpio over the next two days!!!). Girish, Wayne and the Girivihar group decided to sleep outside the cave while the rest preferred the warmth inside. Peter & I noticed some lights moving in the forest below & concluded that they were some villagers from Ratanwadi out for hunting……(to be continued…)

Development, Dynamics CRM, Software, Technology

Restore system generated picklist values in Dynamics CRM 4.0

If you ever happened to delete a system generated picklist value, which was in use earlier, you may run into issues with adding new instances of that entity, synchronizing offline data from the Outlook client and quite a lot of other things, as data exists that uses the deleted value of that picklist. System generated picklist values usually start from 1 and are set incrementally. If you try to add that value again, CRM will not allow you, as you can only add values equal to or greater than 200,000. Values below that number are reserved for backward & forward compatibility as well as for other languages.

As a practice, the system generated picklist values should never be deleted, as you can not restore them later with the CRM user interface directly. And if you happen to, there are a few solutions, depending upon your situation –

  • Restore the CRM database – you can get all your picklist values back by restoring the most recent backup of your organization’s CRM database. However, this may be the least feasible option as a lot of data might have been added or updated in your CRM database after the last backup.
  • Export & import the entity customizations – using the CRM interface, you can export customizations for the affected entity, make the necessary changes in the resulting xml file, and import the customizations back again. Here’s how to –
    1. Go to the Customization menu of the Settings panel, and click on Export Customizations. This will show you the list of entities on your CRM.
    2. Select the entity that has the picklist attribute that we want to restore. Click on Export Selected Customizations button at the top of the list. You will get a prompt that informs you about the customizations that the export will include. Click on the OK button on that prompt.
    3. The customizations are generated as XML and archived in a .zip file (customizations.zip). The browser will prompt you to save that file. Save it to your local drive and extract the XML file inside.
    4. Open the XML file in any text editor. Search for your picklist with its attribute name. You should see sub-elements that specify the options (values) for that picklist –

      <options>
      <option value="200000">
      <labels>
      <label description="Value 1" languagecode="1033" />
      </labels>
      </option>
      <option value="200001">
      <labels>
      <label description="Value 2" languagecode="1033" />
      </labels>
      </option>
      <option value="200002">
      <labels>
      <label description="Value 3" languagecode="1033" />
      </labels>
      </option>
      <option value="200003">
      <labels>
      <label description="Value 4" languagecode="1033" />
      </labels>
      </option>
      <options>

      You may see different values for the languagecode XML attribute depending upon your language settings. However, the point here is to either edit or add an <option> element with the value that you earlier had. For example you could edit the option 200000 above to a value of 1 like this –

      <option value="1">
      <labels>
      <label description="Value 1" languagecode="1033" />
      </labels>
      </option>

      You need to add or modify so that all you earlier picklist values are now in the list. I would recommend to add as that will ensure any data that was added after you deleted the picklist values also maintains its integrity.

    5. Save the file and go to the Customizations menu of the Settings panel.
    6. Click on Import Customizations, browse to the edited file and click on Upload. The entity will get listed. Click on Import Selected Customizations on the top of the list and click OK on any dialogs that crop up. Your earlier picklist values should now be restored and all your synchronizations should work fine.
  • Update the CRM database directly – this is an unsupported way of restoring the values and should only be done if you are completely aware of the process, and comfortable with using SQL queries on the CRM database. In any case, you should back up the CRM database before proceeding. Open up SQL Server Management Studio and connect to the CRM database with SQL Server Administrative privileges. The organization metadata is stored in a schema named METADATASCHEMA on the SQL Server organization database. You can get a list of entities by querying in the METADATASCHEMA.Entity table. You have to look out for the EntityId of your entity.
    You can get it by a query like –

    SELECT * FROM METADATASCHEMA.Entity WHERE LogicalName = 'Your_Entity_Name' (replace Your_Entity_Name by the name of your entity)

    OR
    SELECT * FROM METADATASCHEMA.Entity WHERE ObjectTypeCode = 100 (replace 100 by the object type code of your entity.)

    Then, you can filter the METADATASCHEMA.Attribute table by the value of the EntityId column in the above query like this –

    SELECT * FROM METADATASCHEMA.Attribute WHERE LogicalName = 'Your_Attribute_Name' AND EntityId = 'Your_Entity_Id' (replace Your_Attribute_Name by the name of your picklist attribute and Your_Entity_Id by the value of the EntityId column in the earlier query)

    The value of the AttributeId is what you need for the further queries.

    You can get the current (and old) picklist values from the METADATASCHEMA.AttributePicklistValue table like this –

    SELECT * from METADATASCHEMA.AttributePicklistValue WHERE AttributeId = 'Your_Attribute_Id' (replace Your_Attribute_Id with the value of the AttributeId column in the earlier query)

    Here you will see all picklist values, old and new. You can locate the current values by looking at the Value and CustomizationLevel columns. You have to choose to modify certain values which are active and you have added (which means they will have a value of 200,000 or greater). This is because you can always add a value of 200,000 or above later from the CRM interface. In other words, the trick is to update the existing value to system generated picklist values less than 200,000 (which you can not do from the CRM interface) and later add the required 200,000 (and above) values from the CRM interface. The value of the column AttributePicklistValueId is what you need as the key for the UPDATE statement.

    Your query will look like –

    UPDATE METADATASCHEMA.AttributePicklistValue SET Value = 1 WHERE AttributePicklistValueId = 'Your_AttributePicklistValueId'
    (replaced Your_AttributePicklistValueId with the value of your AttributePicklistValueId in the earlier query and 1 with the system generated picklist value you wish to set).

    We are not done yet! There is one more table to update – you need to do a matching update in the dbo.StringMap table. This is where your current values are stored. You can use a query like –

    UPDATE dbo.StringMap SET AttributeValue = 1 WHERE ObjectTypeCode = 100 AND AttributeName = 'Your_Attribute_Name' AND AttributeValue = 200000 AND LangId = 1033
    (replace 1 with the system generated picklist value you wish to set, Your_Attribute_Name with the name of your attribute, 200000 with the current picklist value you can modify and LangId with the language code. You can remove the LangId filter if you are using only one language.)

    That’s it. If you go and check the picklist values in the CRM interface now, you should see the values you have updated in the last query. Now, make sure you change the names as per your requirement as well as add the new values (which will be 200000 or greater) so that recent data does not lose integrity. Restructuring in this way does not cause problems as picklists are referred in actual data by their values and not the GUID of the values in the metadata. So, as long as the picklist has a particular value with the expected name everything should work fine!

General, Software, Technology

32-bit ODBC DSN on a 64-bit version of Windows

Yet another note on running the 32-bit version of Scribe Insight on a 64-bit version of Windows. Earlier, we talked about making 32-bit registry changes on a 64-bit version of Windows. Now, we look at creating ODBC connections for use in Scribe.

32-bit ODBC connections will not be visible from the 64-bit ODBC Data Source Administrator available from Start -> Control Panel -> Administrative Tools -> Data Source (ODBC). In fact, none of the 32-bit Scribe drivers will be listed in the Drivers tab.

You will need to fire the 32-bit ODBC Data Source Administrator by running C:\Windows\SysWOW64\odbcad32.exe from Start -> Run. All the required Scribe drivers will be listed on the dialog box that opens, and you will be able to create DSN entries that can be consumed by your 32-bit Scribe Workbench. For quick access, we created a shortcut on the Desktop for opening the 32-bit ODBC Data Source Administrator.

General, Software, Technology

Editing 32-bit registry keys on a 64-bit version on Windows

Earlier, I posted a solution for the Scribe error – defined maximum memory usage (300 MB) exceeded. The solution involves increasing the maximum memory usage setting for Scribe by adding a couple of registry keys.

Later, we received the same error on our Scribe Production server running on Windows Server 2008 R2 64-bit version. Since, we were running the 32-bit version of Scribe, we could not use the default 64-bit Registry editor (that runs when you fire the command regedit.exe) to add the required keys. The 64-bit Registry editor displays the 32-bit entries under the Wow6432Node sub-key. The HKEY_LOCAL_MACHINE\SOFTWARE 32-bit sub-key can be found under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node on the 64-bit registry editor. There was a process of Registry Reflection in use till Windows Server 2008, but it has been deprecated in Windows 7 and Windows Server 2008 R2. Reflection involved copying registry keys between the two (32-bit and 64-bit) views, creating two separate physical copies. Windows 7 and Windows Server 2008 R2 share the same copy, instead of using reflection.

The 32-bit registry editor can also be used to manage 32-bit registry keys. It can be run by going to Start -> Run and entering %systemroot%\syswow64\regedit and clicking OK. For more details, visit this link.

A better solution, in our case, was to use the 64-bit version of Scribe Insight.

Development, EAI, Scribe, Software, Technology

Scribe error: Message processor shutting down – defined maximum memory usage (300MB) exceeded

A few days back, one of our Scribe Insight 7 development servers stopped running integration tasks. On the Scribe Console -> Collaborations -> {Name of Collaboration} -> Integration Processes screen, the Last Queued and Scheduled Time values were showing as expected, however the Scribe Console -> Administration -> Execution Log was not showing any data after a particular time. When we looked into the Scribe Console -> Administration -> Alert Logs, we found the following error for a couple of integration processes:

Fatal error 325 occurred: Message processor shutting down - defined maximum memory usage (300MB) exceeded. Please contact Scribe support at support@scribesoft.com if this problem persists.

We restarted the Scribe services and everything started running normally. It looked like the Message Processor service had exceeded the memory limit allocated to it. To increase the memory limit, we searched on the Scribe OpenMind forums. Here is the way to increase the memory limit –

https://openmind.scribesoftware.com/topics/141

It says that the default memory limit is 300 MB and can be increased by adding a few registry settings. The Scribe Services need to be restarted for the settings to take effect. Also, if increasing the memory limit doesn’t solve the problem then there could be a memory leak somewhere …

.NET, Development, Dynamics CRM, Software, Technology

Development using the Microsoft CRM 4.0 SDK (4.0.12)

For an integration project involving implementation of a service-oriented abstraction layer for our Dynamics CRM (4.0), we have been using the new Microsoft CRM 4.0 Software Development Kit (version 4.0.12). The SDK provides powerful features that can be utilized for almost any development aspect related to Dynamics CRM.

The most exciting part of the SDK is the inclusion of the Advanced Developer Extensions that is being called Microsoft xRM. It uses ADO.NET and simplifies a lot of complex tasks. You will get a development experience similar to the ADO.NET Entity Framework with Microsoft xRM. There’s good documentation that comes with the SDK, and one can get started quickly.

The few things that we found really useful –

  1. Connection management to CRM is greatly simplified. You can connect using a single line of code. The information required is stored in the <connectionStrings> section of your app.config or web.config file. To initiate a connection to a CRM instance, you just need to pass the name of the corresponding connection string as a parameter for the constructor of the CRMDataContext class. The DataContext class (derived from CRMDataContext) provides for all connection management to the CRM instance.
  2. There is a packaged command-line utility called crmsvcutil.exe that can generate strongly typed classes for the CRM entities. It even generates classes for all custom entities and attributes. This is great, since it allows the Microsoft xRM to work in ORM fashion.
  3. Using LINQ to query CRM is now possible, and that opens up interesting possibilities. The query results can be used for data binding on ASP.NET pages. Also, there are inbuilt DataSource controls that can make the querying task trivial.
  4. It is possible to combine static entities (one generated using crmsvcutil.exe) and dynamic ones (without generated code) in the same operation. So, you have the flexibility to fine-tune your code whenever required.

The SDK can be downloaded from here.

Software, Technology, TFS

Use TFS 2010 from Visual Studio 2008 SP1

During the upgrade to TFS 2010, we discovered that there were a few projects in Visual Studio 2008 SP1, and the project teams could not afford to upgrade to Visual Studio 2010. So, we had to make Visual Studio 2008 SP1 connect to TFS 2010.

We had to install the Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010. This enables VS 2008 SP1 to connect to TFS 2010. After installing the patch (on some developer machines, we had to do a restart), we followed the steps below to connect to the TFS 2010 server:

  1. In VS 2008, go to Tools -> Connect to Team Foundation Server.
  2. Click on the Servers button, and then click on the Add button.
  3. In the Team Foundation Server Name text box specify the full path of the TFS team project collection. This is of the format – http://tfsservernameorIP:port/tfs/CollectionName. The default collection has a name of DefaultCollection. This format is necessary and VS 2008 will throw an error if you do not enter it correctly. If you do not know the full path, open VS 2010 on any machine, and connect to the TFS server. Select the required Team Project Collection in Team Explorer and look at the Properties window. You will see the full path as the value of the Url property.
  4. Since, you have entered the protocol (http or https) and the port in the full path, the Connection Details section on the Add Team Foundation Server dialog box is disabled. So, no inputs are required there.
  5. Click on OK and then on Close. You should now be prompted for authentication (if required), and the Team Explorer window should display the required team project collection contents.
Software, Technology, TFS

TFS 2010 Error TF205022 – Path contains more than the allowed 259 characters

Recently, we tried to add our existing .NET solution to TFS 2010 Source Control. We were taken by surprise when we received an error that said:

TF205022: The following path contains more than the allowed 259 characters. ${Path}.Specify a shorter path.

TF205022 Error

The culprit turned out to be .datasource files that get created when we add a Service Reference to any project. The .datasource file is generated automatically during the generation of the proxy class in the Reference.cs file, and has a file name format of namespace.childnamespace.childnamespace……name.datasource (fully qualified namespace before the file name). This can easily make the file name lengthier than allowed. If we prefix the path to the file in the Source Control repository hierarchy, the entire path length can easily exceed the TFS 259 character limit.

However, the .datasource file is not needed to build the project and can be deleted safely. Actually, it is only needed for the generation of the proxy class in the Reference.cs file. So, we deleted all the .datasource files in the solution and successfully checked-in the solution to TFS 2010.

There was still one problem left to tackle – when we update the Service Reference, the .datasource file is created again, and is a candidate for the next check-in. The solution was to install TFS 2010 Power Tools (available at http://visualstudiogallery.msdn.microsoft.com/en-us/3e8c9b68-6e39-4577-b9b7-78489b5cb1da) and add a check-in policy that rejects .datasource files.

Follow the steps below to do this:

Open Team Explorer, and browse to your Team Project Settings and then click Source Control. In the Check-in Policy tab, click Add to add a Forbidden Pattern Check-in policy. The pattern will be a regular expression that matches the file names you want to exclude (in our case, it was \.datasource$). This should throw a violation of check-in policy for anyone trying to add .datasource files to the source repository.

The path length limitation raises a few questions. The limit is actually related to the Windows API – neither a TFS or Windows issue. However, if TFS could utilize an API that supports long paths, that should do the trick. Recent Windows version support 32,000 character long paths. However, it looks like TFS sticks to the Windows API for backward compatibility purposes.

For details on file naming and path conventions visit Naming Files, Paths, and Namespaces

A detailed coverage of the .NET implementation of file names & paths is here – Long Paths in .NET Part 1Part 2Part 3

An interesting read on why one may (or rather should) never need long paths is here.

On the other hand, go here for a good article on the security & implementation drawbacks of short file names.