i am able to refresh view page using actionpoller at some interval time in salesforce but
i want to refresh my datatable, only when any changes made to the object that is bind to my view page like insert , update ,delete happen to object must reflect my datatable automatically.
please guide me..
Thanks
You can use Force.com Streaming API for this. Force.com Streaming API Developer's Guide contains the details regarding how to use it along with a example of refreshing a Visualforce page automatically using streaming api.
Related
I am working on a project that shows live currency prices. I have to refresh the pricing data on the page dynamically. In this project I am using Django and SQL server. I could not figure out how to make it work using triggers and AJAX because AJAX needs an event to run like a user event or timer (that very bad for performance). Further, triggers can not be processed by Django. Is there a way to do it? Thank you for your help.
I have used react-gtm-module to implement Universal Analytics tracking on a multi-page React application/website.
The data is coming through to Google Analytics, but the data layer is not and I'm hoping someone can help me identify why.
GTM Preview mode
I can see that when the container is loaded, all of the data layer values are set to the default value of 'Unknown'. This is what is passed through to Google Analytics.
However, when the Window is loaded, the data layer is populated with values. This is not being sent through to Google Analytics.
How do I push the data layer through to Google Analytics at the correct moment, once the data is available?
Many thanks,
Katie
Hi since you mention that you are using react-gtm-module there were different method to add data layer in your code. you need to read this https://www.npmjs.com/package/react-gtm-module#datalayer.
i have used it.
i will give you example for it.
if you want to add data layer on specific click event.
first you need to write datalayer code in you web app.like this
follow for add data in data layer
second step is to verify you data is push to your data layer or not.
for that got to your browser console and write datalayer.
then it's big data set you need to find your event name and check in there your
data is there or not.
also you need to make variables according your data.follow step 2 to do this step.
in this you need to verify it on your preview mode of GTM. after if you want to access that data in GA you need to make custom event trigger in GTM and add it in your Event tag you also need to add event parameters in event tag.
for access data in GA you can follow this video alsofollow for how to get data in GA
Note : for data layer push you have only this solution what i share. because you use that react-gtm-module.
The values are only sent to Google Analytics when there is a 'hit' to be sent. A datalayer.push (when you insert values into the datalyer) is not considered a hit, thus no data will be available.
You have some options here.
The best scenario would be to insert the values into the datalayer before the GTM is even loaded on the website. That would guarantee that all your hits would have the data available, and you would not need to delay any hits.
If that is not possible, you can also change your datalayer.push implementation to include an 'event' parameter, and then use that as a condition on the Google Analytics tag. Something like this:
dataLayer.push({
'event': 'dataLayerLoaded',
'environment': env,
'isAdminUser': isAdmin,
...
})
You can then create an event trigger that fires on the event 'dataLayerLoaded', and use this trigger on the Google Analytics Page View tag instead of the normal 'page view' one.
If you choose to follow this last route, be aware that this event will need to fire every time, otherwise no data will be sent at all. Also, if you have any custom events implemented, you may have to change their logic you use to take into consideration this new approach.
EDIT: It is also possible to change your Google Analytics Page View Trigger to "Window Loaded", but you'll need to be sure that the datalayer will always load before that, otherwise you will lose information.
I am a very newbie to SF so pardon my ignorance. I am doing the trailheads and logged into developers org. There I quickly created a custom object with some fields. Now how do I get a CRUD page for the custom object. I have been looking through the documentation and trailheads but I finding everything except this simple step. Can someone please suggest how I can get a CRuD page automatically generated from custom object that I can use to add edit and delete records?
Thanks
You'll need to Create a Tab for your custom object. This tab can be exposed in both Salesforce Classic and Lightning and allows you to create a new record in the object, view list views, and so on.
We have a problem in updating the data lists on dashboard page after creating a new list in create page. It already saved on the database, but not updating in the views. It updates once i click the refresh button on the browser but this is a one page web app. How can I update the lists on my dashboard page after adding a data from the previous page without refreshing the page? I used couchbase for database.
The problem here is that you are loading the content from your persistent storage, and then it's in angular as-is, and to retrieve any updates you will have to re-fetch it from your persistent storage. Unfortunately, it is not as simple to $watch your back-end.
You have some options here: if you are making your change from within the angular component of the site, then you can just call a function when you are creating a new page which re-fires your db-access code, and refreshes the model.
If you are making changes from outside of angular, then you will need to either use polling to refresh your angular model periodically, or go for a fancier web-socket option, as explained here.
After reading this question and your other question, my guess would be, that you get the old view from couchbase.
Per default couchbase sets the stale parameter to update_after, which results in getting the updated view only after the second access, see the couchbase documentation for more information.
To fix this, it should be sufficient to set stale to false.
If you access couchbase via REST call, adding ?stale=false to the call should do the trick, otherwise add the parameter according to your used SDK specification.
I have a doubt, i've been working with salesforce for a while and now i have a requirement from a customer.
They need that some custom fields be populated with a value of parent object, making some research on stackoverflow, i found this post, but this isn't working for me because my project is a manage package and when this is installed on a another salesforce instance the id of custom field change.
if someone could help me, I will be grateful.
Thanks!.
I can't see any way of doing the same as that post without using the IDs, I was thinking you could route via a VF page and build up the URL in the controller but it doesn't seem as though you can get the IDs of fields, just their type etc..
I think the best you could do in this instance is to override the default new recordpage with a visualforce page. In the constructor of your controller you could then loop through the page parameters and pre-fill the corresponding fields on the new record before it's displayed on screen. Using fieldsets or just an <apex:Detail> component would keep the level of effort down and also maximise the flexibility of the page for the end users.