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)

Saving record after opening form using javascript

(0) ShareShare
ReportReport
Posted on by 71

Hello,

I have a case, where I'm opening the pre populated email form (using the openForm function). I need to save it immediately after opening in order to add attachments, and save operation should be performed automatically. Is it possible to achieve using javascript?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Pawar Pravin Profile Picture
    5,237 on at

    Hi,

    Yes you could do it using JavaScript. I think you need to call js function on onload of form. Also inside function you need to check form type should be create.

  • Pocia Profile Picture
    71 on at

    Yes Pravin, I thought about it too, but I want to save the Email after only after opening it through script invoked by ribbon button on Account, and onLoad approach would work also after I open Email form from another places in the system

  • Verified answer
    Kunal Sharma 2019 Profile Picture
    Microsoft Employee on at

    you can configure the form to get extra parameter LInk and then pass extra parameter to the form as part of form parameter of openform and as the extra parameter will come from js you can differentiate the source.

  • Verified answer
    Pawar Pravin Profile Picture
    5,237 on at

    Hi Pocia,

    As suggested by Kunal, you could pass one parameter on ribbon button action and check that parameter to save record.

    Anyway if you open email from other places that parameter will be null.

  • Pocia Profile Picture
    71 on at

    Thank you guys, parameter based approach worked.

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
RichardM Profile Picture

RichardM 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans