Solved

Dynamics CRM 4.0: Copy Redarding Drop Down List value to Subject Field

Posted on 2009-05-12
6
903 Views
Last Modified: 2012-05-06
Hi Experts,

I know I have to add an onchange value to the regardingobjectid field in order to get it to auto populate the Subject field for me. I am trying to get the subject field to auto populate the exact value or string which appears on the regardingobjectid field.

Example: If I choose an Account 'ABC Pty Ltd' in the regarding list of the Phone Call Activity form I would like it to write 'ABC Pty Ltd in the subject field automatically. It will save our guys having to re-write the Regarding field into the subject field.

I have tried: 'crmForm.all.subject.DataValue' = 'crmForm.all.regardingobjectid.DataValue';

but I received an error. The  complete code for the solution would be great as I don't have alot of javascript skills.

Many Thanks.
0
Comment
Question by:logicsolutions
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 10

Expert Comment

by:crm_info
ID: 24363208
Getting a value out of a lookup field is not quite as simple as getting the value out of another field on a form.  The full code (possibly requiring some name changes) is below.
crmForm.all.subject.DataValue = crmForm.all.regardingobjectid.DataValue[0].name;

Open in new window

0
 
LVL 1

Author Comment

by:logicsolutions
ID: 24363274
WOW. Exactly what I needed. Just for the iceing on the cake how do I get it to add a colun (:) symbol on the end. i.e. If ABC Pty Ltd is selected from the list it will automatically put 'ABC Pty Ltd:' in the subject field.

Many Thanks CRM info.
0
 
LVL 10

Expert Comment

by:crm_info
ID: 24363458
crmForm.all.subject.DataValue = crmForm.all.regardingobjectid.DataValue[0].name & ":";
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 1

Author Comment

by:logicsolutions
ID: 24363570
Hi CRM info,

It says 'The Control only accepts strings or nulls as an input' after using the following:

crmForm.all.subject.DataValue = crmForm.all.regardingobjectid.DataValue[0].name & ":";

Big Thanks,
0
 
LVL 10

Accepted Solution

by:
crm_info earned 500 total points
ID: 24363581
Oops - try using

crmForm.all.subject.DataValue = crmForm.all.regardingobjectid.DataValue[0].name + ":";

(replacing the & with a +)
0
 
LVL 1

Author Closing Comment

by:logicsolutions
ID: 31580469
Perfect Solution. God bless your work.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a walkthrough guide I wrote whilst upgrading my on-premise MS Dynamics CRM 3.0 deployment to 4.0. This covers the actual installation of the product to a working level for my system, I ran into a lot of issues that the steps below fixed so h…
Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question