Solved

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

Posted on 2009-05-12
6
893 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
  • 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now