This is real close and I appreciate all the detail here. I'm getting back;
[object Object] 2
So I'm thinking that since I'm pulling one value from a pick list and the other is from a lookup field that maybe that is why it's not grabbing the actual data. Any help is greatly appreciated. Thanks
Main Topics
Browse All Topics





by: crm_infoPosted on 2009-02-17 at 14:49:29ID: 23665203
Yep - it's very possible. Exactly how you do this will depend upon the field types (i.e. Picklists and Lookups require some special treatment). For now, I'm assuming that you're going to be merging two text fields together to do this.
I'll summarize the process and attach some code. If you need more details just let me know and I'll send that along.
(1) First of all, you'll need to open the form for the record that you want to update: In the Web version of CRM: Settings | Customization | Customize Entities | Choose the entity you want this customization to work for | Double Click | Click the Forms and Views item on the side-nav | Double Click on the Form.
(2) I'm assuming that the two fields you want to use to create the third field, and the third field itself, are all on the form. If not, then go ahead and add them to the form.
(3) Now you're going to update the OnSave Event: Click Form Properties (right-side of the form, bottom) | Select OnSave and then Edit | Make sure you check the "Event is enabled" Checkbox | use the sample code, below, as a starting point to develop your own code.
(4) Click OK, Click OK again
(5) From here, you can test your code if you like by using the preview button
(6) Once you're satisfied that the form works the way you like, you can click Save and Close, Save and Close again, then, on the list of all entities, click the Publish button.
Your form should now work the way that you want.
WARNING: JavaScript is case sensitive, make sure you have your case correct. Again, depending upon the types of fields that you are grouping together, this may involve more code than I've place below - let me know if it works for you and, if not, let me know the names of the fields you're workign with and the types of fields and I'll try to give you the specific code you'll need to get this working.
Select allOpen in new window