web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    Re: Accessing the Subject field in a product form

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans