You need to sign in to do that
Don't have an account?
Developement
Account History Related List Issue
Hi,
We have Visual force Page for Accounts. We have also created a history related list on it.
This is the query
but when I update Account owner, I get 2 rows--> 1 with user id and other with user name
How can I get rid of 2nd row i.e. I dont want to see ID row on the history.
Thanks so much for help!
We have Visual force Page for Accounts. We have also created a history related list on it.
<apex:pageBlock title=" History" id="Account_History"> <apex:pageBlockTable value="{!acchistlist}" var="accounthistory" rows="1000"> <apex:column value="{!accounthistory.createddate}"/> <apex:column value="{!accounthistory.createdby.name}"/> <apex:column value="{!accountHistory.field}"/> <apex:column value="{!accounthistory.oldvalue}"/> <apex:column value="{!accounthistory.newvalue}"/> </apex:pageBlockTable>
This is the query
SELECT CreatedById,CreatedDate,CreatedBy.name,Field,NewValue,OldValue FROM AccountHistory
but when I update Account owner, I get 2 rows--> 1 with user id and other with user name
How can I get rid of 2nd row i.e. I dont want to see ID row on the history.
Thanks so much for help!
Kyle Brandt
May I ask why this has to be a VF page and why you dont use the report on AccountHistory?
Developement
This is obviously easy for our users to see the tracking on the account. They just need to scroll down to the page and view the tracking.
Kyle Brandt
If you run your query in Force Explorer https://developer.salesforce.com/page/ForceExplorer do you see the same results? I ran this in my org and don't receive the second line with ID. Might need to see your controller for this.
Developement
Yeah you are right. I do get only 1 row when i run this query separately. I will check the controller.