• Tarun Kaushik 11
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 7
    Replies
We have a below requirement

As a Sales Rep I want to be able to upload documents in association to a record in Salesforce that are classified as highly confidential on an on-premise server ( like internal Sharepoint ) in order to guarantee that high security files are not accessible to people outside of the company. When storing the document I want to stay within Salesforce and don't want to leave the application but can access the document from Salesforce which is not in Salesforce but on any on-premises server. 
As a Sales Rep that has access to a certain object record I want to be able to view all files related to that record.
However as an Salesforce Administrator I want to be able to restrict the permission from salesforce to view all files related to a certain object record to a group of users based on the confidentiality level.

Any suggestions are  appreciated. 

Regard
Tarun
 
Hi All
When Agents accepts the Chat from Live Agent pre chat form, I want to Salesforce should pick it up and in Salesforce (Service Cloud Console) directly open the respective Account, Contact and “New Case” window.
However Right now all three screen are opening but not searching and displaying the detail page of existing records and related Accounts of the existing Contact
Below is the code I am using, Please suggest?
<!--
 - Created by tarkaushik on 09.11.2017.
 -->

<apex:page id="FCM_LiveChatForm" showHeader="false">

<html>
<head>
<script type="text/javascript">
(function() { 
  function handlePageLoad() {
    var endpointMatcher = new RegExp("[\\?\\&]endpoint=([^&#]*)");
    document.getElementById('prechatForm').setAttribute('action',
    decodeURIComponent(endpointMatcher.exec(document.location.search)[1]));
  } 
  if (window.addEventListener) {
    window.addEventListener('load', handlePageLoad, false);
  } else { 
    window.attachEvent('onload', handlePageLoad, false);
  }
})(); 
</script>
</head>
<body>
<form method="post" id="prechatForm">
<apex:pageBlock>  
 <apex:pageblocksection >
<!-- Detail inputs -->
First Name: <input type="text" name="liveagent.prechat:personFirstName" id='firstName'/><br />
Last Name: <input type="text" name="liveagent.prechat:personLastName" id='lastName'/><br />
Email: <input type="text" name="liveagent.prechat:personEmail" /><br />
Phone: <input type="text" name="liveagent.prechat:Phone" /><br />
 </apex:pageblocksection>
</apex:pageBlock>

<input type="hidden" name="liveagent.prechat:CaseStatus" value="New" /><br />
        <input type="hidden" name="liveagent.prechat:CaseOrigin" value="Chat" /><br />
        <input type="hidden" name="liveagent.prechat:CaseRecordType" value="0120Y000000yCt6"/>

            
	<!-- Try to find the Contact by email (exact match) -->  
	  <input name="liveagent.prechat.findorcreate.map:Contact" type="hidden" value="FirstName,ContactFirstName;LastName,ContactLastName;Email,ContactEmail;"/>
         <input name="liveagent.prechat.findorcreate.map.doFind:Contact" type="hidden" value="Email,true;"/>
         <input name="liveagent.prechat.findorcreate.map.isExactMatch:Contact" type="hidden" value="Email,true;"/>
        <input type="hidden" name="liveagent.prechat.findorcreate.showOnCreate:Case" value="true"/>  
        
<!-- Map the detail inputs to the Account fields and RecordTypeId will be changed based on the Org--> 
<input type="hidden" name="liveagent.prechat.findorcreate.map:Account" value="FirstName,personFirstName;LastName,personLastName;PersonEmail,personEmail;Phone,Phone;RecordTypeId,0120Y000000y6Ej;" />

<!-- Try to find the Account by email (exact match) -->
<input type="hidden" name="liveagent.prechat.findorcreate.map.doFind:Account" value="PersonEmail,true;" />
<input type="hidden" name="liveagent.prechat.findorcreate.map.isExactMatch:Account" value="PersonEmail,true;" />
<!-- Used to set the visitor's name for the agent in the Console -->
<input type="hidden" name="liveagent.prechat.name" id="prechat_field_name" />

<!-- Used to set the visitor's details in the Chat Transcript custom fields -->
        <input type="hidden" name="liveagent.prechat:caseOrigin" value="Chat"/>
        <input type="hidden" name="liveagent.prechat.save:personFirstName" value="FCM_VisitorsFirstName__c" />
        <input type="hidden" name="liveagent.prechat.save:personLastName" value="FCM_VisitorsLastName__c" />
        <input type="hidden" name="liveagent.prechat.save:personEmail" value="FCM_VisitorsEmail__c" />
        <input type="hidden" name="liveagent.prechat.save:Phone" value="FCM_VisitorsPhone__c" />
 

<!-- Show the Account when it is found or created -->
<input type="hidden" name="liveagent.prechat.findorcreate.showOnCreate:Account" value="true" />


<input type="submit" value="Request Chat" id="prechat_submit" onclick="setName()"/>

<!-- Set the visitor's name for the agent in the Console to first and last name provided by the customers -->
<script type="text/javascript">
   function setName() {
    document.getElementById("prechat_field_name").value =  
        document.getElementById("firstName").value + " " + document.getElementById("lastName").value;
    }
</script>

</form> 
</body>
</html>
</apex:page>

Hi 
I have installed Login flow Unmaaged package provided by Salesforce.
Issue - When I am login in through it, after I click on Next with checkbox (Accept) checked It is not taking me to the Home screen of Salesforce Istead it is just showing me the rotating spinner on the screen and not redirecting me to the Home screen of Salesforce
Anybody had the same issue before??

Please help

 

Hi
When I am creating the new Case using 'New Case' global  action form Community portal login,It is not showing  up the record type selection page.
How can I achive it..?

​Regards
Hi
I have imported 20000 articles on sfdc knowledge base.
I want to mass publish and archive respective articles, how can I achieve it.

Regards
Tarun
HI

I want to put a check on article type, If article is linked to a Case then it should not allow  the only  "archived" to be deleted but user can delete article in "draft"
How can I achieve it.?
 
Hi

I have custom picklist field on an Article Type, I want to hide the article for some profiles the basis of values of Picklist values
Example-
picklist values
1-Confidencial
2-Not Confidencial

So if the values of picklist value is"confidencia" it will only be visible to profile 1 but if the value of picklist vlaue is "Not confidencial"It will only be visibile to Profile 2 of same article type.

Moreover i  see a field in article properties i.e. "Article Audience" however I am not able to find any way to edit or assign it on salesforce knowledge.Can anybody know what is the use and significance of this field.
Belwo is the screenshot
User-added image
Hi

I have approval process to publish the article type so I dont want to get article published before it goes into approval process.
To achieve this functionality Can I disable the stadard button "Publish" like on some condition like (when status= "In Creation") means article is just created and can submit for approval. 
In other  waye it means, After creation of a new article type We can publish the article by clicking on stadard button. I dont want to get article  type to be published manually before it goes to the approval.
Hi

I want update the validation status of article type as 'Archived' when a published article is aricivied amnually by standard button 'Archive' on article Type

Tried with apex- invoked method through process builder but when article is archiving it is not calling process builder.( I mean when user is archiving the published article manually,process is not taking it as update on an article type)
and we gonna do it with batch class- if archived article is edited by any user then it has two version of article one is draft state and other one is in archived state. So it is showing (common.apex.runtime.impl.ExecutionException: You can't perform this action. Be sure the action is valid for the current state of the article, and that you have permission to perform it)

Below is the @invocable method

@InvocableMethod
 

    public static void updateassignedto(List<Technical_Q_A__kav> techarticlelist)
    {
    Map<String,string> techarticletypidmap = new Map<String,string>();
    Map<String,string> techarticleiddatemap = new Map<String,string>();
    set<string> Technicalqaidset = new set<string>();
    list<Technical_Q_A__kav> technicalqalist = new list<Technical_Q_A__kav>();
    map<string,Technical_Q_A__kav> masteridarticlemap = new map<string,Technical_Q_A__kav> ();
    List<Id> articleIDs = new List<Id>();
    List<String> articleNumbers = new List<String>();
    List<Id> tobearchivearticleIDs = new List<Id>();
    
            if(tqa.Publishstatus=='Archived'){
            
            for(Technical_Q_A__kav  tq: [SELECT Id, ArticleNumber, KnowledgeArticleId,masterversionid,ValidationStatus
                    FROM Technical_Q_A__kav
                    WHERE  PublishStatus = 'Archived' AND Language = 'en_US' ]){
               
                Technicalqaidset.add(tq.KnowledgeArticleId);
            system.debug('tkset'+Technicalqaidset);
                try{String articleId = tq.KnowledgeArticleId;
                String masterid = KbManagement.PublishingService.editArchivedArticle(articleId);
                masteridarticlemap.put(masterid,tq);
                articleNumbers.add(tq.ArticleNumber);
                }
                catch(exception e){
             }
             }
            system.debug('masteridtk'+masteridarticlemap);
            
            List<Technical_Q_A__kav> articles = new List<Technical_Q_A__kav>();
        for (Technical_Q_A__kav d : [SELECT Id, KnowledgeArticleId
                                FROM Technical_Q_A__kav
                                WHERE PublishStatus = 'draft' AND Language = 'en_US' AND  KnowledgeArticleId IN :Technicalqaidset]) {
            // perform your updates
            d.validationstatus='Archived';
            articleIDs.add(d.KnowledgeArticleId);
            articles.add(d);
            system.debug('tkupdatelist'+articles);
            if(articles.size()>0)
            update articles;
            
            }
            }
             
                for (String articleId : articleIds) {
                tobearchivearticleIDs.add(articleId);
                KbManagement.PublishingService.publishArticle(articleId, true);
        
            }
                    for (String aarticleId : tobearchivearticleIDs) {
        
                    Datetime scheduledDate = NULL;
                    KbManagement.PublishingService.archiveOnlineArticle(aarticleId, scheduledDate);
        
        }    
HI All

when we edit the published article ,It gives us two records of article one is with publishstatus='Draft' and other one is publishstatus='Published' with same values in all fields.
I want to archive the article with publishstatus='published' on the update of corresponding article publishstatus='Draft'.

I have tried it by invoking @invocable method  by process builder using below method of PublishingService Class,however i am getting below error

Error Occurred: An Apex error occurred: System.HandledException: You can't perform this action. Be sure the action is valid for the current state of the article, and that you have permission to perform it.

String articleId = 'hard coded KnowledgeArticleId of articletype with publishstatus='Draft' ';
Datetime scheduledDate =NULL;
Method-KbManagement.PublishingService.archiveOnlineArticle(articleId,scheduledDate);

How can I achieve it..?

 
Article Life Cycle flowHow ca I achieve below Requirement

When a new article is created then I want to assign it to a user (OWNER=user) then if it is submitted for approval, it should assign to a queue(OWNER=Queue) and later on users of the respective queue can accept it and change the owner of Article.

Like for example- we have a standard functionality on Case object in which we can assign a Case to user (OWNER=user) or a Queue (OWNER=Queue) and after it is assigned to a queue then It will be visible on the list view of user(agent) under my cases tab and then he/she can accept it form the 'accept button'

As of now standard owner field is not available on Article type object, So is there any way to achieve this functionality on Aricle Type..?
 

Hi All,

We have a custom button (part of case detail page) with visualforce override (VF page has been rendered as PDF). This button works perfectly fine in classic. I can see the pdf generated.

In Salesforce lightning, this is throwing an error. "An internal server error has occurred. An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience."

When I inspect the page and see I see this error "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided " . Debug logs also not showing any errors.

Any idea why this button is not working in lightning ?

Thanks
Natraj

We are running out of file storage in our Salesforce Org. Other than deleting old data or buying more storage we are looking for other options.

Below is one of the option I think of but not sure if it can be achieved:
User uploads files in Salesforce. But it should actually save to SharePoint/Google Drive. User should not know that, file is being saved in SharePoint and Only the Reference to the files should be in Salesforce. 
After save, User can access all these files and when he/she should clicks the file in Salesforce, it should pull the data from SharePoint and display it for him. So this way we will not use memory in Salesforce.

Any other suggestions are greatly appreciated.

Thanks in advance.
HI

I want to put a check on article type, If article is linked to a Case then it should not allow  the only  "archived" to be deleted but user can delete article in "draft"
How can I achieve it.?
 
HI All

when we edit the published article ,It gives us two records of article one is with publishstatus='Draft' and other one is publishstatus='Published' with same values in all fields.
I want to archive the article with publishstatus='published' on the update of corresponding article publishstatus='Draft'.

I have tried it by invoking @invocable method  by process builder using below method of PublishingService Class,however i am getting below error

Error Occurred: An Apex error occurred: System.HandledException: You can't perform this action. Be sure the action is valid for the current state of the article, and that you have permission to perform it.

String articleId = 'hard coded KnowledgeArticleId of articletype with publishstatus='Draft' ';
Datetime scheduledDate =NULL;
Method-KbManagement.PublishingService.archiveOnlineArticle(articleId,scheduledDate);

How can I achieve it..?

 
Article Life Cycle flowHow ca I achieve below Requirement

When a new article is created then I want to assign it to a user (OWNER=user) then if it is submitted for approval, it should assign to a queue(OWNER=Queue) and later on users of the respective queue can accept it and change the owner of Article.

Like for example- we have a standard functionality on Case object in which we can assign a Case to user (OWNER=user) or a Queue (OWNER=Queue) and after it is assigned to a queue then It will be visible on the list view of user(agent) under my cases tab and then he/she can accept it form the 'accept button'

As of now standard owner field is not available on Article type object, So is there any way to achieve this functionality on Aricle Type..?