Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
174 views
in Technique[技术] by (71.8m points)

Get Set Values JavaScript Quick View Form - Dynamics

Im trying to retrieve a value from a quick view form of a related entity and trying to set a hidden field on this form so I can use the value to send out an email. I have got the below code so far, but have been unable to get it to work. New to this so any help is appreciated.

function getEmail(){
    
    if (Xrm.Page.getControl('QuickviewControl1611244448861_QuickviewControl1611244448861_associateavailability_email') != null)
    {
            var emailQuickForm = Xrm.Page.getControl('QuickviewControl1611244448861_QuickviewControl1611244448861_associateavailability_email');
            var email = emailQuickForm.getAttribute().getValue();
            //set email on parent form 
var newEmail = Xrm.Page.getAttribute("email").setValue(email);
            console.log(newEmail);

    }
    else{
        return null;
    }
}

I should add that this is runs on the "onSave" event of the record.

question from:https://stackoverflow.com/questions/65921494/get-set-values-javascript-quick-view-form-dynamics

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...