• Rishi Kumar 53
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi,

Im trying to open a VF Page from a formula hyperlink field as follows:
HYPERLINK('/apex/PDFView?id=' +   Id , 'View PDF')
I have also tried:
HYPERLINK('/apex/PDFView?id=' +  CASESAFEID(id) , 'View PDF')

And i always get the following error:
Id value ka426000000000p is not valid for the XXXXX__kav standard controlle

I have noticed that if I set the Id manually on the url bar to kA426000000000p ('A' in upper case) it works fine, as is the Id value when you go into the standard record view.

Any idea about what could be causing this?

Thank you very much!

Hi all,

 

I have some 5 record types on the case, Not able to see the stadard picklist field 'Status' on the record types.

Please give some solution, I need to edit the picklist value so that reassign the existing picklist value to the record types.

Hi, I'm new to apex and salesforce in general and am trying to implement a public knowledge site.

 

I've added a custom field, "buildTOC" to a "self_help" knowledge article type and have been trying to create a custom page to display this article type. The idea is that I have some articles that require a table of contents and I am going to generate this using javascript once the page is delivered based on the value of "buildTOC" for that article.

 

I'm customizing the knowledgeController w/ an extra function, "getBuildTOC". In it I'm trying to get the article id by using the following as seen in the examples.

 

 

Id id = ApexPages.currentPage().getParameters().get('id');

 

 

 

This gets me an ID that looks like kA0A0000000PTub.

 

I'm trying to query buildTOC based on that ID,

 

 

 List<Self_Help__kav> articles = [SELECT id, title ,BuildIndex__c FROM Self_Help__kav WHERE id = :id];

 But I always get an empty recordset.

 

 

Trying to figure out why, I tried executing the following query in the SystemLog executor.

 

 

system.debug([select title,id from self_help__kav where publishStatus='online' and language='en_US']);

 

 

Which returns me a list of records including the article that I am refering to earlier. The problem is that it lists it as a different ID. The result of this query lists it as ka0A0000000PUKvIAO and if I hardcode that value into my earlier query, I get a proper record returned.

 

How do I access this "other" id from page parameters or is there a different way to do this that I'm missing? Why is there two ID's? Is one the published ID?

 

Thanks!