• Karthik Sankar
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 14
    Replies

I have installed Salesforce for Mobile in my iPad (ios ver 4.3.2) but not to activate the app when I enter my user and password details. It gives me an error that 'Not connected, please check your network settings'. But I am sure that internet is connected. Is there any way out for this?

 

Also, the specific "Salesforce for iPad" apps in the app market is for ios Ver 5. Could you provide me with a link for ios 4 ,if any?

I am using <knowledge:articleList sortBy="mostViewed"> in my visualforce to retrieve all the knowledge articles in the most viewed order. Then I am passing this to a custom component to display all the knowledge articles in a customized format. Sample code as below:

 

<knowledge:articleList articleVar="a" sortBy="mostViewed">

<c:customComp con={!con} aid="" title="" summary="" urlName="" articleTypeName="" articleTypeLabel="" lastModifiedDate="" firstPublishedDate="" lastPublishedDate=""/>

</knowledge:articleList>

 

In the knowledge:articleList tag, only standard fields like KnowledgeArticleId, summary, urlName, etc are accessible as above. My requirement is to display the average rating of each of the knowledge article along with their label and name.

 

But the average rating field is available in a different object - KnowledgeArticleVoteStat which has a reference to KnowledgeArticleId. How do I use the average rating of an article (which is in a separate object) to display inside the knowledge:articleList tag?

 

 

 

Can anyone explain how to create custom chatlets in the live agent console?

I created a sample flow - Calculate_Tip given as tutorial in the visual workflow implementation guide. Then I created a visualforce page - FlowPage embedding the flow. The code is as below:

 

<apex:page >
<flow:interview name="Calculate_Tip"/>
</apex:page>

 

Then I created a custom button on Case detail page which links to the above visualforce page. I am able to access the flow page inside Salesforce but when trying through Customer Portal, the below error appears.

 

Data Not Available
The data you were trying to access could not be found. It may be due to another user deleting the data or a system error. If you know the data is not deleted but cannot access it, please look at our support page.

 

 

In the flow, I am not accessing any specific data/custom object from the org which should be enabled for Customer Portal profile. I have enabled the visualforce page for the Customer Portal profile as well. Since I am new to creating flows, not sure what could be the problem. If anyone had faced the same issue in the Customer Portal, please let me know how to resolve it.

 

 

Also let me know if multilingual support is enabled for flows. 

 

 

I have a custom object Consultant which has a lookup to Account. The Account lookup is made read-only in the Consultant page layout level.


As Sys Admin, I am able to see the Account lookup getting populated when a New Consultant is created from Account related list. But when logged in as a different User, I am not able to see the Account lookup getting populated and since its read-only in the Consultant page layout, no data is available for the User to enter.

The same issue doesn't happen with standard Account - Contact relationship, if Account lookup is made read-only at Contact page layout.

Let me know if anybody can help in this issue!!!

 

Regards,

Karthik.

I am getting this exception "You have uncommitted work pending - Please rollback or commit".

 

I did the following :

 

I set a save point ,do an update, Rollback then made a callout.

 

Savepoint sp  = Databse.savepoint();

Update record;

rollback(sp);

 

makeOutboundCall(X,X,X);

 

Please help.

 

 

 

 

 

I have a simple usecase of opening a new window while clicking a custom button in a detail page record, closing it immediately and then refreshing the parent window (from which the new window was opened).

This functionality works fine when I use javascript in S-Control for closing the current window and refreshing the parent window. The sample code below:

<html>
<script>
function reSizeWindow()
{
refreshWindow();
top.window.close();
}
function refreshWindow()
{
opener.location.reload();
}
</script>
body onload="reSizeWindow();">
<center>
<br><br><br>
<SPAN STYLE=" font-size: 75%; font-family: 'Arial', 'Helvetica', sans-serif;">
Updating Account and Contact Information... Please Wait.
</span><br><br>
<img src="/img /waiting_dots.gif " alt="Please wait..." title="Please wait..." height="20" width="196">
</center>
</body>
</html>

But when I convert this to a visualforce page, the javascript code to refresh the parent window doesn't work. The sample code for vf page below:

<apex:page standardController="<custom_obj__c">
<script>
window.onload = function()
{
refreshWindow();
top.window.close();
}
function refreshWindow()
{
opener.location.reload();
}
</script>
</apex:page>

If I remove the refreshWindow() function, then the closing of current window is working fine but the opener.location is not recognized in this page.

This usecase may look unnecessary, but the actual implementation would be some updation happening in the controller and returning back to the same page.

Any suggestion regarding any workaround to refresh a parent window in visualforce or let me know if I am missing something.

Regards,
Karthik.
I want to get the QueueId from the Queue Sobject and assign it to the Case OwnerId field in Apex.

The QueueId will be based on the SobjectType and the Queue Name.

I am using this query for the purpose.
QueueSobject que = [Select Id, SobjectType, QueueId, Queue.Name from QueueSobject where SobjectType = 'Case' AND Queue.Name = 'Water Application Support'];

But since the Queue Name is not unique (unlike RecordType where you can't have same RecordTypeName for an object), if there are two Queues with the same name and related to same SobjectType, the query will fail to return a single record and my assignment of OwnerId will throw an exception.

Salesforce allows you to create duplicate queue records with the same Name and related SobjectType. There will be no difference between these two records except for their Ids.

But I don't want to hard-code the Id value in the query.

Please suggest me in this to get the appropriate QueueId.

Thanks,
Karthik.

In a visualforce page, I am providing options to create task with all the task fields. In the standard edit page of the task, you can find out a checkbox "SendNotificationEmail" which can be customized at page layout only.



In my visualforce page also, I need to provide the same checkbox. If there is any field for sendNotificationEmail at the database level, then I can simply use <apex:inputField> tag. But I could not find out a field for sendNotificationEmail.



So, one way to send email is, I can place a checkbox in the visualforce page for sendnotificationemail and at the controller, if that checkbox is clicked, I will send a mail using Email class of apex. But, is this the only way to do it?



So, please let me know is there any field for sendNotificationEmail in task at the database level or

is there any way to send email?

 

Regards,

Karthik.

Is there anyway to remove/hide the standard Save & New button on the edit page of Salesforce.

 

I don't want this action for my User and I don't have control over the standard edit page layout of Salesforce unlike the detail page layout. Please let me now if this is possible in some ways in the standard Salesforce page itself.

 

Regards,

Karthik.

Is there anyway to remove the 'Del' link that appears when a Task/Event is added to Activity History.

I am able to hide the standard buttons like Clone, Edit in the detail page of any record by adding an inline S-Control with height and width values as zero in any section of the page layout. This S-Control gets the Id/Name (button being a static object) of the button object in script and makes its style as hidden.

But 'Del' link (being an dynamic object) appears only when records are added in the Activity History can't be done like the same mentioned above for hiding buttons.

Please let me know if anybody can throw some light on this.

Thanks,
Karthik.

Hi,

 

Is it possible to build validation rules or custom logic in Salesforce to check to see if a document is attached to the transaction as well. 

I am having a word document stored in Document object. I need to retrieve only the content and display it in a VF page.

I have written the query in a controller class to get the body of the document. The body is returning as Blob data type. Then I am converting the Blob to String using ToString() method in Apex.

Code for your reference:
----------------------------------
Document d = [Select body, bodyLength, ContentType, Url from Document where id = :'01580000000n17L'];
Blob b = d.body;
String s = b.toString();

But the output is showing as more encoded characters along with the content. These encoded characters, I suppose, are meta-data for the word document like font properties, alignment, etc. I need only the content of the document.

In the same way, if I use a Notepad file to get the content, it is working fine and I get only the content.

Please tell me a way to get the content only from a Word document without the encoded characters.

Can anyone explain how to create custom chatlets in the live agent console?

I created a sample flow - Calculate_Tip given as tutorial in the visual workflow implementation guide. Then I created a visualforce page - FlowPage embedding the flow. The code is as below:

 

<apex:page >
<flow:interview name="Calculate_Tip"/>
</apex:page>

 

Then I created a custom button on Case detail page which links to the above visualforce page. I am able to access the flow page inside Salesforce but when trying through Customer Portal, the below error appears.

 

Data Not Available
The data you were trying to access could not be found. It may be due to another user deleting the data or a system error. If you know the data is not deleted but cannot access it, please look at our support page.

 

 

In the flow, I am not accessing any specific data/custom object from the org which should be enabled for Customer Portal profile. I have enabled the visualforce page for the Customer Portal profile as well. Since I am new to creating flows, not sure what could be the problem. If anyone had faced the same issue in the Customer Portal, please let me know how to resolve it.

 

 

Also let me know if multilingual support is enabled for flows. 

 

 

I've spent the last few hours looking at posts and documentation and I'm yet to find anything around Multilingual support in Visual Workflow forms.

 

Does anyone have any experience in this and could shed some light on the matter?

 

Thanks in advance.

I have a custom object Consultant which has a lookup to Account. The Account lookup is made read-only in the Consultant page layout level.


As Sys Admin, I am able to see the Account lookup getting populated when a New Consultant is created from Account related list. But when logged in as a different User, I am not able to see the Account lookup getting populated and since its read-only in the Consultant page layout, no data is available for the User to enter.

The same issue doesn't happen with standard Account - Contact relationship, if Account lookup is made read-only at Contact page layout.

Let me know if anybody can help in this issue!!!

 

Regards,

Karthik.

I have a simple usecase of opening a new window while clicking a custom button in a detail page record, closing it immediately and then refreshing the parent window (from which the new window was opened).

This functionality works fine when I use javascript in S-Control for closing the current window and refreshing the parent window. The sample code below:

<html>
<script>
function reSizeWindow()
{
refreshWindow();
top.window.close();
}
function refreshWindow()
{
opener.location.reload();
}
</script>
body onload="reSizeWindow();">
<center>
<br><br><br>
<SPAN STYLE=" font-size: 75%; font-family: 'Arial', 'Helvetica', sans-serif;">
Updating Account and Contact Information... Please Wait.
</span><br><br>
<img src="/img /waiting_dots.gif " alt="Please wait..." title="Please wait..." height="20" width="196">
</center>
</body>
</html>

But when I convert this to a visualforce page, the javascript code to refresh the parent window doesn't work. The sample code for vf page below:

<apex:page standardController="<custom_obj__c">
<script>
window.onload = function()
{
refreshWindow();
top.window.close();
}
function refreshWindow()
{
opener.location.reload();
}
</script>
</apex:page>

If I remove the refreshWindow() function, then the closing of current window is working fine but the opener.location is not recognized in this page.

This usecase may look unnecessary, but the actual implementation would be some updation happening in the controller and returning back to the same page.

Any suggestion regarding any workaround to refresh a parent window in visualforce or let me know if I am missing something.

Regards,
Karthik.
I want to get the QueueId from the Queue Sobject and assign it to the Case OwnerId field in Apex.

The QueueId will be based on the SobjectType and the Queue Name.

I am using this query for the purpose.
QueueSobject que = [Select Id, SobjectType, QueueId, Queue.Name from QueueSobject where SobjectType = 'Case' AND Queue.Name = 'Water Application Support'];

But since the Queue Name is not unique (unlike RecordType where you can't have same RecordTypeName for an object), if there are two Queues with the same name and related to same SobjectType, the query will fail to return a single record and my assignment of OwnerId will throw an exception.

Salesforce allows you to create duplicate queue records with the same Name and related SobjectType. There will be no difference between these two records except for their Ids.

But I don't want to hard-code the Id value in the query.

Please suggest me in this to get the appropriate QueueId.

Thanks,
Karthik.
I am having a word document stored in Document object. I need to retrieve only the content and display it in a VF page.

I have written the query in a controller class to get the body of the document. The body is returning as Blob data type. Then I am converting the Blob to String using ToString() method in Apex.

Code for your reference:
----------------------------------
Document d = [Select body, bodyLength, ContentType, Url from Document where id = :'01580000000n17L'];
Blob b = d.body;
String s = b.toString();

But the output is showing as more encoded characters along with the content. These encoded characters, I suppose, are meta-data for the word document like font properties, alignment, etc. I need only the content of the document.

In the same way, if I use a Notepad file to get the content, it is working fine and I get only the content.

Please tell me a way to get the content only from a Word document without the encoded characters.