tag:blogger.com,1999:blog-3003801964503297388.post3144407332827638405..comments2024-03-28T09:21:16.448+02:00Comments on Microsoft Dynamics CRM 4.0 - Unleashed: CRM 4.0 Multi PicklistAdi Katzhttp://www.blogger.com/profile/16783428437179825705noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-3003801964503297388.post-22362854501153465312008-12-19T17:14:00.000+02:002008-12-19T17:14:00.000+02:00Hi Nick,Put the debugger keyword inside the OnForm...Hi Nick,<BR/><BR/>Put the debugger keyword inside the OnFormSave Function (line 50) and see where it breaks.<BR/><BR/>I also strongly recommend implementing the multi select picklist using the following post http://mscrm4ever.blogspot.com/2008/12/crm-40-supported-multi-select-picklist.html.<BR/><BR/>AdiAdi Katzhttps://www.blogger.com/profile/16783428437179825705noreply@blogger.comtag:blogger.com,1999:blog-3003801964503297388.post-50426650711826539612008-12-01T21:08:00.000+02:002008-12-01T21:08:00.000+02:00I pasted this code exactly and setup the fields......I pasted this code exactly and setup the fields... but I am getting an error pop-up 'An error has occured' when I save the record...<BR/><BR/>Any ideas on how to fix?Nick Doelmanhttps://www.blogger.com/profile/13871825794604494144noreply@blogger.comtag:blogger.com,1999:blog-3003801964503297388.post-55322488084007745712008-10-04T21:49:00.000+03:002008-10-04T21:49:00.000+03:00Hello,I tried this code and was having some troubl...Hello,<BR/><BR/>I tried this code and was having some trouble getting all but the last picklist value selected to show as selected-- I used alert function to debug and the problem went away without me changing any other code. That suggested there was an issue with the refresh. So I ended up having to add a SetFocus() action in the code to make sure the picklist changes showed up on the screen (see below:)<BR/><BR/>>>snip<<<BR/>//re-select the picklist options<BR/> for( var i = optionList.length - 1 ; i >= 0 ; i-- )<BR/> {<BR/> for( var k = Instance.Picklist.options.length - 1 ; k >= 0 ; k-- )<BR/> { <BR/> var option = Instance.Picklist.options[k];<BR/> if( option.value == optionList[i] )<BR/>{<BR/>option.selected = true;<BR/>//the following is needed to make sure the selections show properly<BR/>Instance.Picklist.SetFocus();<BR/>}<BR/>>>snip<<Unknownhttps://www.blogger.com/profile/16499113387792943896noreply@blogger.comtag:blogger.com,1999:blog-3003801964503297388.post-40614152855103193742008-09-22T20:43:00.000+03:002008-09-22T20:43:00.000+03:00Adi,If you tried to email me, the account email wa...Adi,<BR/>If you tried to email me, the account email was turned off - I guess I didn't go out there for awhile!!<BR/><BR/>It is back on now ;)Richhttps://www.blogger.com/profile/10322686345121631109noreply@blogger.comtag:blogger.com,1999:blog-3003801964503297388.post-15293668151698390552008-09-20T04:10:00.000+03:002008-09-20T04:10:00.000+03:00Adi,Great - Love the new code!! My bad on the N:N ...Adi,<BR/>Great - Love the new code!! My bad on the N:N - I was trying to make a suggestion for another post and it didn't come out right. The times to use that versus this are totally different.<BR/><BR/>One more thought on this post - to make it PERFECT - we need to add 1 more field. The filtered view does a great job of enabling you to use it for reporting and other things where you don't need to do joins and other such garbage. But with this the first _s just holds the keys (1,4,5,etc). We need one more to hold the real values so we can report on it.<BR/><BR/>Please note my email address - I would love to be able to converse outside of these comments if that is ok with you.<BR/><BR/>RichRichhttps://www.blogger.com/profile/10322686345121631109noreply@blogger.comtag:blogger.com,1999:blog-3003801964503297388.post-54236983632650010962008-09-20T00:49:00.000+03:002008-09-20T00:49:00.000+03:00Hi Rich,I revised the code so the first pick would...Hi Rich,<BR/><BR/>I revised the code so the first pick would be on top. I implemented the solution on a questioner with very short lists (3-5 options) so I completely missed on the scrolling part. <BR/><BR/>The N:N IFrame is an option, certainly more supported then this one, but I really like the idea of using a picklist to build the options. The reason why I ruled out the IFrame option is that you first need to create (save) the entity and only then relate the options unless you plug-in to the post entity create event and that didn’t suit my needs. I didn’t find any decent example on the web using multi-multi so I can’t tell you much about the new button.<BR/><BR/>Anyway, glad you’re enjoying my blog…<BR/><BR/>AdiAdi Katzhttps://www.blogger.com/profile/16783428437179825705noreply@blogger.comtag:blogger.com,1999:blog-3003801964503297388.post-89817308151413103362008-09-19T22:53:00.000+03:002008-09-19T22:53:00.000+03:00Adi,Love your blog by the way - you have some real...Adi,<BR/>Love your blog by the way - you have some really interesting things!!<BR/><BR/>2 things:<BR/>1.) I created a picklist called favorite color - added 10 colors, so I got a scrollbar on my list (very cool). HOWEVER - when I go back to the form the list is down where the last selected item is. I haven't tried it but I think it would display better if you changed all of your loops to go the opposite way - from bottom to top.<BR/><BR/>2.) Unrelated to this: - If you put a multi-multi into an iFrame (there are lots of places where people explain how to do it) there is no New option on the grid - any idea how to get one??Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3003801964503297388.post-64918316451749884782008-09-19T18:39:00.000+03:002008-09-19T18:39:00.000+03:00Hi Rich,Glad you got it working. As you mentioned ...Hi Rich,<BR/><BR/>Glad you got it working. <BR/><BR/>As you mentioned the picklist size relies on the form's layout (spaces under the picklist).<BR/>You can change the for loop and insert extra checks to make sure the objects (TRs) exists.<BR/><BR/>AdiAdi Katzhttps://www.blogger.com/profile/16783428437179825705noreply@blogger.comtag:blogger.com,1999:blog-3003801964503297388.post-59123822345958608942008-09-19T18:21:00.000+03:002008-09-19T18:21:00.000+03:00I figured it out - the part about what the size re...I figured it out - the part about what the size really meant and what it was for escaped me. Once I "made space" for the multi-select to have someplace to appear, it all worked like a charm. So I guess the note to all is if you don't make room for it to appear, you will get an error. But it will be <B> Your Fault!! </B>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3003801964503297388.post-36852986516963805562008-09-19T17:43:00.000+03:002008-09-19T17:43:00.000+03:00I am pasting this into the CRM 4.0 VPC image. I g...I am pasting this into the CRM 4.0 VPC image. I get and error in this code<BR/>for( var i = 1 ; i < Instance.Size ; i++ ) <BR/> { <BR/> currentTR = currentTR.nextSibling; <BR/> if( currentTR ) <BR/> { <BR/> currentTR.deleteCell(countTD); <BR/> currentTR.deleteCell(countTD); <BR/> } <BR/> } <BR/>'<BR/><BR/>I get an Object Required error.<BR/><BR/>Thanks!Anonymousnoreply@blogger.com