help needed with script RRS feed

  • Question

  • Im very new to JS, so please be gentle

    I need to modify the script below.

    if address1line1 is not a null then Acton address2_line1.setValue(address1_line1);

    how can I do this.

    function SetBillingAddress() 
     var address1_line1= Xrm.Page.data.entity.attributes.get("address1_line1").getValue();
     var address2_line1= Xrm.Page.data.entity.attributes.get("address2_line1"); 
     var address1_line2= Xrm.Page.data.entity.attributes.get("address1_line2").getValue();
     var address2__line2= Xrm.Page.data.entity.attributes.get("address2__line2"); 
     var address1_line3= Xrm.Page.data.entity.attributes.get("address1_line3").getValue();
     var address2_line3= Xrm.Page.data.entity.attributes.get("address2_line3"); 
     var address1_city = Xrm.Page.data.entity.attributes.get("address1_city").getValue();
     var address2_city = Xrm.Page.data.entity.attributes.get("address2_city"); 
     address2_city.setValue(address1_city );
     var address1_stateorprovince = Xrm.Page.data.entity.attributes.get("address1_stateorprovince").getValue();
     var address2_stateorprovince= Xrm.Page.data.entity.attributes.get("address2_stateorprovince"); 
     address2_stateorprovince.setValue(address1_stateorprovince );
     var address1_postalcode = Xrm.Page.data.entity.attributes.get("address1_postalcode").getValue();
     var address2_postalcode= Xrm.Page.data.entity.attributes.get("address2_postalcode"); 
     address2_postalcode.setValue(address1_postalcode );
     var address1_country = Xrm.Page.data.entity.attributes.get("address1_country").getValue();
     var address2_country = Xrm.Page.data.entity.attributes.get("address2_country"); 
     address2_country .setValue(address1_country );

    Dont ask me .. i dont know

    • Moved by Caillen Wednesday, November 20, 2013 6:24 AM JS question.
    • Changed type Just Karl Wednesday, November 20, 2013 3:39 PM It's a question
    Tuesday, November 19, 2013 5:37 PM


  • Hello Pete,

    I'm afraid this is not a correct forum for your question, you could post your question in ASP.NET Forums > General ASP.NET > HTML, CSS and JavaScript forum where you can receive better responses.

    Thanks for your understanding.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Just Karl Wednesday, November 20, 2013 3:39 PM
    • Marked as answer by Pete Newman Monday, November 25, 2013 2:27 PM
    Wednesday, November 20, 2013 6:23 AM