web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Accessing the Subject field in a product form

(0) ShareShare
ReportReport
Posted on by 85

Hi all

I am attempting to take the data from the subject field on the product form and use it to build a url to pass to an iframe on another tab

During my testing if I hardcoded the variable it all worked fine. However if I try and use the real data I get undefined and object(object) in my alerts i am using for debugging. have tried using both .value and Datavalue as tests. I am guessing that the actual data is not the string I am actually expecting so am wondering how to access that string from the form??

Any ideas are appreciated.

below is my code

//collecting the subjectid from the form and splitting it so we can build the url dynamically

var CRMvar=crmForm.all.subjectid.DataValue;

alert(CRMvar);
CRMvar=crmForm.all.subjectid.value;
alert(CRMvar);
var CRMproduct=CRMvar.substr(8);
alert(CRMproduct);

*This post is locked for comments

I have the same question (0)
  • Mark Lloyd Profile Picture
    85 on at

    All sorted

    Found that the subjectid has to be returned to an array and then there is a .name attrib to pull the string out.

    Loving Google today

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans