Solved

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

Posted on 2009-05-12
6
898 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

821 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