Announcements
Hi
I have a variable on lead: var activityNumber = "1";
I want to increment this number each time a new activity is created. To do this I have want to call this variable on the activity and increment, but I am not able to recall the variable. I have tried alert (window.top.opener.activityNumber); and just window.top.activityNumber but get error message that the variable is not defined.
How can I get the variable and increment it from activity to lead.
Many thanks for help!
*This post is locked for comments
Hi Martin,
Why you are not creating real time workflow . I think this will be easiest way to do this using workflow .
Please have a look below reference where I have answered--
https://community.dynamics.com/crm/f/117/t/308613
In addition you can try with this -
- var no = window.parent.opener.Xrm.Page.getAttribute("new_activityno").getValue();
- var incrmentNo = no + 1;
- window.parent.opener.Xrm.Page.getAttribute("new_activityno").setValue(incrmentNo);
André Arnaud de Cal...
293,440
Super User 2025 Season 1
Martin Dráb
232,569
Most Valuable Professional
nmaenpaa
101,158
Moderator