• Ritik
  • NEWBIE
  • 55 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 1
    Likes Given
  • 29
    Questions
  • 32
    Replies

I'm trying to create a consistent look and feel for Lightning web components by using a common CSS module. For this, I have followed the solutions given in https://releasenotes.docs.salesforce.com/en-us/summer20/release-notes/rn_lwc_css_share.htm and https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_components_css_share.

Now, if I'm creating css file in the below structure

cssLibrary ├──cssLibrary.css └──cssLibrary.js-meta.xml

then, when I'm calling this cssLibrary in my main component c:compositionBasics as @import 'c/cssLibrary' I'm getting the error as "force-app\main\default\lwc\compositionBasics\compositionBasics.js No MODULE named markup://c:cssLibrary found : [markup://c:compositionBasics]"


while, if I'm creating the files as (added JS and HTML files as well, just like any other lwc component)
cssLibrary ├──cssLibrary.css └──cssLibrary.js-meta.xml ├──cssLibrary.js └──cssLibrary.html

then I'm able to save the compositionBasics component (NO errors) but my CSS is not getting reflected.

Note: detailed code can be found in https://github.com/trailheadapps/lwc-recipes/tree/master/force-app/main/default/lwc/compositionBasics (My folder structure of compositionBasics is also exactly same)

Please help! Do let me know if I'm missing anything in here. Also let me know if for nesting a css @import 'c/cssLibrary'; is not a correct way.

Best,
Ritik

  • July 24, 2020
  • Like
  • 0

Hello,

I have installed an appeExchange app called Dupeblocker 3. But I am unable to find any developer support, so please let me know the same.

I'm having following problems:
1. Error message is not coming properly. - Some javascript code is getting displayed instead oft he error.
2. Rules are not working properly in case of mobile number (especially mobile number).
3. It is not working in the case of Full name, First Name or Last Names as well.


Please help, or let me know where I can get help.

Best,
Ritik
 

 

  • February 22, 2017
  • Like
  • 0
Is it possible to display internal salesforce article on public site?

If yes then how?
Even I have tried to make a visual force page and have tried to display data thru it but it is not getting displayed on site(while internally everything is visible on that page but not site) . So if anyone knows how to give access to profile of site then please let me know.
Any other solutions are also welcome.
  • February 17, 2017
  • Like
  • 0
Hello,

I have used collapsible="true" in pageBlockSection and it is working fine.
Now, I have a requirement wherein I have to replace the image (default triangle image) with + sign or some similar symbol.
Any idea how can I achive this?
Although I tried some hacking and with inspect element I was able to get the Id but the problem is that I have approximately 10 pageblocksection on the page(in all I have to replace the image) also they get displayed dynamically(i.e based on some conditions).

Best,
Ritik
 
  • May 19, 2016
  • Like
  • 0
Hi,

I have already built site login page and some pages after that with Customer Portal enabled. 
Now I have a requirement wherein if a user is already loggedin so he should be redirected to page2 else to page 1.
With little digging I have found that by checking (UserInfo.getUserType() != 'guest') we can check if the user is loggedin or not.

But my main concern is that: If I am getting redirected from some other website/webpage to my SFDC site and
        if the user
             - is already logged in then he should get redirect to the page2.i.e. if the same browser is used for redirecting to SDFC site so with the same session Id he should be logged in into my portal.
             - else to page 1 where he has to fill some information ........... and do some tasks

Please let me know if some further information is required.

Best,
Ritik 
              
  • March 28, 2016
  • Like
  • 0
Hello All,

I am not able to create new community (from All Communities --> New Communities). The error I am getting is "An internal server error has occurred". Error ID: 310890904-203823 (-1617309786)

 Can anybody help in creating a new one or else let me know the possible solution.

Best,
Ritik
  • March 01, 2016
  • Like
  • 0
Hello,


I am trying get the content of the attachment using APEX.
For this I have used -
    string myEncodedString = EncodingUtil.base64Encode(mailAttachment.Body);
        system.debug('myEncodedString +++++++ ' + myEncodedString);
        
        string attBody = EncodingUtil.base64Decode(myEncodedString).toString();

With this I am able get data for csv and .txt(UTF-8 enconded) file but I am not abl read the contents of .docx, .xlsx, .pdf etc
The error I get is 'BLOB is not a valid UTF-8 string'.
After a bit of research I found that, though formats like .docx are encoded in UTF-8 but they are archieved formats (similar to zip).

So can anybody help me to get the content of these formats.

Help would be appriciated.

Best,
Ritik
  • February 28, 2016
  • Like
  • 0
Hi,
Can I add parameters in the URL when clicking standard 'New' button @ custom object's tab view.
Note:- For list view, I have created a new button, which redirects to the edit layout to create a new record, and there I pass some parameters in the URL as well due to which some of my fields gets pre populated.
And I need similar functionality for my New button as well.


Any help is appropriated
Thanks and regards,
Ritik
  • February 17, 2016
  • Like
  • 0
Hello,

I have created a set of three Visualforce page (of same controller). The first page is called from the list view button of an object, and rest are in continuation like a wizard (listview button --> page1--> page2--> page3 --> page1).
My pages use standard controller with extensions and none of the functionality is there in which the vf code is not intracting with controller.
Now the same functionality is to be reiterated for ten new objects, so in that case I will have to create 30 (10*3) new vf pages. 

Help me with a method wherein I can reuse the vf code.

Thanks and Regards,
Ritik
  • December 31, 2016
  • Like
  • 0
Hello,
I have a requirement wherein I have to send mail to list of users with appropriate email template. 
But, the end-user who will send mail (on click of a button) should see the template on a page and should also be able to edit it (if required). 
i.e the email template should be displayed in an input text.

For this I have created a vf page with a class. 

Here I am able to query all email tempaltes in the org.
I have used below quries
Query1:
SELECT Body, BrandTemplateId, Description, DeveloperName, FolderId, Folder.DeveloperName , HtmlValue, 
        Id, IsActive, Markup, Name, Subject, TemplateStyle, TemplateType, 
FROM EmailTemplate

AND

Query2:
select id, name, value from BrandTemplate


But still I am not able to display the template as is in vf page.


Please help.
Do let me know if any futher clarification is required.


Thanks,
Ritik
  • October 24, 2015
  • Like
  • 0
Hello,

How can we develop blog kind of thing in my vf page, wherein, if the page is hosted on force.com site then the end user can write reviews, give ratings, and then retweet on some comments.


Thanks and Regards,
Ritik
  • September 18, 2015
  • Like
  • 0
Hi,

In my org there is an already installed managed package with the object 'ABC' and there is one profile 'XYZ' with 'High Volume Customer Portal' as User License.

Now,
I have created a VF page wherein I am accessing a field of Object ABC. But unfortunately it is not visible on my VF page when I see it via user of XYZ profile.
For resolving when I looked into the profile I found that this particular Object is not present in "Custom Object Premission" (while it is visible in other custom profiles which have user license salesforce etc.).

Any idea how can I make this custom object visible on my profile and henceforth on my VF page.


Thanks!
Regards,
Ritik
  • August 12, 2015
  • Like
  • 0
Hi,

I have a code wherein we have used JQuery to for autocomplete (jQuery.ui.autocomplete.prototype._renderItem).

Here problem is that if first "MyFirstFieldAutocomplete" gets invokes then third "MyThirdFieldAutocomplete" doesn't gets invoked.
While auto populate functionality works fine if value in MyThirdFieldAutocomplete is filled first.
(One more problem is that even no console logs/alerts gets generated(so that I can debug) if we fill MyFirstFieldAutocomplete first.)


**************CODE******************************

 jQuery(document).ready(function(){
    jQuery.ui.autocomplete.prototype._renderItem = function( ul, item) {
          var re = new RegExp(this.term, "i") ;
          var t = item.label.replace(re,"<span style='font-weight:bold;color:Blue;'>" + this.term + "</span>");
          return jQuery( "<li></li>" )
              .data( "item.autocomplete", item )
              .append( "<a style='cursor: pointer; background-color:white;'>" + t + "</a>" )
              .appendTo( ul );
    };
    
    jQuery('.MyFirstFieldAutocomplete, .MySecondFieldAutocomplete, .MyThirdFieldAutocomplete, ').each(function(){
        var thisInput = this;
        
        console.log('this' + this);
        jQuery(this).autocomplete({
            minLength: 2,            
            source: function(request, response) {  
                queryTerm = request.term;
                console.log('queryTerm ' + queryTerm );
                
                var filterValue = '';
                var searchObject = '';
                var fieldList = '';
                var filterField = '';
                
                if(jQuery(thisInput).hasClass('MyFirstFieldAutocomplete')){
                    filterValue = 'First RecordType';
                    searchObject = 'Account';
                    fieldList = 'BillingCountry';
                    filterField = 'recordtype.name';
                }else{
                    if(jQuery(thisInput).hasClass('MySecondFieldAutocomplete')){
                        filterValue = 'SecondFilter';
                    }
                    searchObject = 'CustomObject__c';
                    filterField = 'customField__c';                
                }
                
                if(jQuery(thisInput).hasClass('MyThirdFieldAutocomplete')){
                    filterValue = 'Third RecordType';
                    searchObject = 'Account';
                    fieldList = 'BillingCountry';
                    filterField = 'recordtype.name';
                    alert('High School');
                    console.log(filterValue, searchObject, fieldList, filterField);
                    console.log('Test2');
                    console.log('queryTerm inside MyThirdField' + queryTerm );
                }
                
                console.log(filterValue, searchObject, fieldList, filterField);
                
                myClassController.getAutoCompleteList(filterValue, request.term, searchObject, fieldList, filterField, 
                    function(result, event){
                    if(event.type == 'exception'){
                        alert(event.message);
                    }else{
                        sObjects = result;
                        response(sObjects);
                    }
                });
            },
            select: function(value, data){
                if (typeof data == "undefined") {
                    this.value= value;
                }else{
                    lookupPick2('formId',this.id+'_lkid',this.id,data.item.recordId,htmlDecode(data.item.name),false);
                }
                return false;
            }
        });             
    });
});


<td>
   <apex:inputField value="{!lstCustomObjNew.customFieldLookup__c}" id="thirdId" styleClass="MyThirdFieldAutocomplete"/>
</td>


Any help would be appriciated.


Regards,
Ritik
  • July 20, 2015
  • Like
  • 0
Hi,

Is there any possible method by which I can format the UI of error message in a trigger?

Scenerio:
I have to display the error when a person clicks "Save" (standard button) on a Custom Object's standard edit page layout.
For this I have written a trigger (trigger.New.addError(......)).
Here, I have to display a table (which will show all the values coming from a list.)
If not possible, I have to display values of atleast one field in different rows.
For this I have written

errorMsg = 'Following possible duplicates are present: ';
for(integer i=0 ; i < myListVar.size(); i++){
          errorMsg +=  myListVar[i].name + '\n';
}
Trigger.new[0].addError(errorMsg);


But it is not working. The whole text is coming in one line. (Although in debug log it is coming in different lines.)
Instead of \n I have also tried \r\n.

So, please tell me a method by which I can display the error mesaage in a better way.
If possible, I also want a hyperlink in names in error  message.

 
Thanks,
Ritik
  • July 06, 2015
  • Like
  • 0
Hi,

How can I check a particular field's dependencyin the org.

To ensure dependency I have tried to delete the field but it is not the foolproof solution as some dependecies, like reports etc., are not getting covered in that.

SO what is method by which I can garuntee that a metadata (especially a field) is used /have dependency in all other metadata?

Eg: A field XYZ is used in a class, VF page, validation rule, report etc.
So I need the list wherever this XYZ field is used.


Hope my query is clear, but do let me know if any further information is required.


Thanks,
Ritik


 
  • June 18, 2015
  • Like
  • 0
Hi,

I have a field of data type Long Text Area wherein I have some data in below mentioned format. Here I have to mask some text (not everything) from this data (Please refer the example below ). Can anybody help me in achieving this or atleast tell me the appropriate approach for this.


Example:
Sample Input (Data in in the LONG TEXT AREA field):

Name     : ABCDEF
Age        : 20 Years
Email    : testEmail@test.com
Body    : This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.
          This is a sample text. This is a sample text. This is a sample text. This is a sample text.
Some Other Data: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
DOB        : 01-01-1905
Some Other Data1: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data2: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data3: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data4: This is a sample text. This is a sample text. This is a sample text. This is a sample text.


Sample Output (which is required)
Name     : XXXXXX
Age        : XX Years
Email    : XXXXXXXXX@XXXX.XX
Body    : This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.
          This is a sample text. This is a sample text. This is a sample text. This is a sample text.
Some Other Data: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
DOB        : XX-XX-XXXX
Some Other Data1: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data2: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data3: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data4: This is a sample text. This is a sample text. This is a sample text. This is a sample text.      



Here name, age, dob etc. are masked.

Any help would be great.



Regards,
Ritik
  • June 08, 2015
  • Like
  • 0
Hi,

Has any body done any integration with Sunstone analytics.
If yes please let me know.
Let me know if there are any APIs available or is there any tool or anything else available to integrate that with salesforce.


Regards,
Ritik
  • June 04, 2015
  • Like
  • 0
Hi,

I have displayed a chart in a visualforce page using Google API Scatter Chart. In that, I have a functionality wherein a single data is represented by a dot on a  X-Y graph and its corresponding values are shown in tooltip (on hover on that dot).

Now I have problem wherein more than one data have same value (i.e more than one data lie on the same x-y coordinate). So in tooltip details of one data is displayed.

How can I display the details of all the datas in tooltip (of all those dots which have the same X-Y coordinates)

Regards,
Ritik
  • May 04, 2015
  • Like
  • 0
Wired behavior of APEX class.

Can anybody explain why I am able to save class with some object name as class name while not with others?
For Ex: In below code I am able to save public class User, public class account but not public class case or public class customObject__c.
 
APEX Class:

public class user {
    
// Custom Object
public class Tester_s_Obj2__c{
}

Public class Account{
}
    
// Another Standard Object
public class case{
}

}






Regards,
Ritik
  • April 10, 2015
  • Like
  • 0

Hello,

What will be the impact/problem when

1. I f there  is a property which is get set and it is just plainly used in class but not on VF page.
2. property is initiallized but not used anywhere in class or Vf. (Impact in terms of speed of processing and memory allocation especially)
3. OrderBy Clause in terms of speed of processing (As I have a piece of code where OrderBy clauses are overused)
4. fieldName != null in where clause of SOQL



5. Please let me know what all should I look while reviewing an APEX code.
I am following https://developer.salesforce.com/page/Apex_Code_Best_Practices and few blogs searched from Google.


Regards,
Ritik

  • April 09, 2015
  • Like
  • 0
Hi,

I need to Integrate youtube search engine in my visualforce page. So that whenener the user searches the video in search bar, he should get a list of videos present in youtube (same as in youtube website). After that when he clicks one of the video of the list, he should be redirected to that video in youtube.

I have tried an example given in https://developers.google.com/youtube/v3/code_samples/javascript but I'm not able to make it workable.
Any help would be highly appriciated.
Please treat it as urgent.

Thanks in advance! :)

Regards,
R_Shri
  • May 20, 2014
  • Like
  • 2
Hi,

I am trying to replace Standard Opportunity detail page with my visualforce page.
Here I am able to acheive most of the things except
    1. Probability is not getting updated while changeing StageName (in inlineEdit and not even after saving it)
  
     2. Not able to display Relatedlist hover

Note: I am not using apex:detail, instead I am using pageblock and apex:outputfield tags

below is my code snippet

<apex:form>
<apex:pageblock mode="maindetail">
  <apex:pageBlockSection title="Opportunity Related Information" id="thePageBlockSectionDetail11">
                <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton" event="ondblclick"
                    changedStyleClass="myBoldClass" resetFunction="resetInlineEdit" />
               
                 <apex:outputField value="{!Opportunity.StageName}" id="stageFieldId1"/>
                <apex:outputField value="{!Opportunity.Probability}" id="probabilityFieldId"/>  
               
         </apex:pageBlockSection>
</apex:pageblock>
</apex:form>

Please reply soon. (As it is a bit urgent.)
Any help would be highly appriciated

Thanks in advance,

Ritik
  • January 14, 2014
  • Like
  • 1

I'm trying to create a consistent look and feel for Lightning web components by using a common CSS module. For this, I have followed the solutions given in https://releasenotes.docs.salesforce.com/en-us/summer20/release-notes/rn_lwc_css_share.htm and https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_components_css_share.

Now, if I'm creating css file in the below structure

cssLibrary ├──cssLibrary.css └──cssLibrary.js-meta.xml

then, when I'm calling this cssLibrary in my main component c:compositionBasics as @import 'c/cssLibrary' I'm getting the error as "force-app\main\default\lwc\compositionBasics\compositionBasics.js No MODULE named markup://c:cssLibrary found : [markup://c:compositionBasics]"


while, if I'm creating the files as (added JS and HTML files as well, just like any other lwc component)
cssLibrary ├──cssLibrary.css └──cssLibrary.js-meta.xml ├──cssLibrary.js └──cssLibrary.html

then I'm able to save the compositionBasics component (NO errors) but my CSS is not getting reflected.

Note: detailed code can be found in https://github.com/trailheadapps/lwc-recipes/tree/master/force-app/main/default/lwc/compositionBasics (My folder structure of compositionBasics is also exactly same)

Please help! Do let me know if I'm missing anything in here. Also let me know if for nesting a css @import 'c/cssLibrary'; is not a correct way.

Best,
Ritik

  • July 24, 2020
  • Like
  • 0
Is it possible to display internal salesforce article on public site?

If yes then how?
Even I have tried to make a visual force page and have tried to display data thru it but it is not getting displayed on site(while internally everything is visible on that page but not site) . So if anyone knows how to give access to profile of site then please let me know.
Any other solutions are also welcome.
  • February 17, 2017
  • Like
  • 0
Hi,

I have already built site login page and some pages after that with Customer Portal enabled. 
Now I have a requirement wherein if a user is already loggedin so he should be redirected to page2 else to page 1.
With little digging I have found that by checking (UserInfo.getUserType() != 'guest') we can check if the user is loggedin or not.

But my main concern is that: If I am getting redirected from some other website/webpage to my SFDC site and
        if the user
             - is already logged in then he should get redirect to the page2.i.e. if the same browser is used for redirecting to SDFC site so with the same session Id he should be logged in into my portal.
             - else to page 1 where he has to fill some information ........... and do some tasks

Please let me know if some further information is required.

Best,
Ritik 
              
  • March 28, 2016
  • Like
  • 0
Hello All,

I am not able to create new community (from All Communities --> New Communities). The error I am getting is "An internal server error has occurred". Error ID: 310890904-203823 (-1617309786)

 Can anybody help in creating a new one or else let me know the possible solution.

Best,
Ritik
  • March 01, 2016
  • Like
  • 0
Hello,


I am trying get the content of the attachment using APEX.
For this I have used -
    string myEncodedString = EncodingUtil.base64Encode(mailAttachment.Body);
        system.debug('myEncodedString +++++++ ' + myEncodedString);
        
        string attBody = EncodingUtil.base64Decode(myEncodedString).toString();

With this I am able get data for csv and .txt(UTF-8 enconded) file but I am not abl read the contents of .docx, .xlsx, .pdf etc
The error I get is 'BLOB is not a valid UTF-8 string'.
After a bit of research I found that, though formats like .docx are encoded in UTF-8 but they are archieved formats (similar to zip).

So can anybody help me to get the content of these formats.

Help would be appriciated.

Best,
Ritik
  • February 28, 2016
  • Like
  • 0
HI 

I have date in 2016-02-04T22:21:32.169Z format.How to convert it to Apex DateTime?

Ed
Hello,
I have a requirement wherein I have to send mail to list of users with appropriate email template. 
But, the end-user who will send mail (on click of a button) should see the template on a page and should also be able to edit it (if required). 
i.e the email template should be displayed in an input text.

For this I have created a vf page with a class. 

Here I am able to query all email tempaltes in the org.
I have used below quries
Query1:
SELECT Body, BrandTemplateId, Description, DeveloperName, FolderId, Folder.DeveloperName , HtmlValue, 
        Id, IsActive, Markup, Name, Subject, TemplateStyle, TemplateType, 
FROM EmailTemplate

AND

Query2:
select id, name, value from BrandTemplate


But still I am not able to display the template as is in vf page.


Please help.
Do let me know if any futher clarification is required.


Thanks,
Ritik
  • October 24, 2015
  • Like
  • 0
Hello,

How can we develop blog kind of thing in my vf page, wherein, if the page is hosted on force.com site then the end user can write reviews, give ratings, and then retweet on some comments.


Thanks and Regards,
Ritik
  • September 18, 2015
  • Like
  • 0
Hi,

I have a code wherein we have used JQuery to for autocomplete (jQuery.ui.autocomplete.prototype._renderItem).

Here problem is that if first "MyFirstFieldAutocomplete" gets invokes then third "MyThirdFieldAutocomplete" doesn't gets invoked.
While auto populate functionality works fine if value in MyThirdFieldAutocomplete is filled first.
(One more problem is that even no console logs/alerts gets generated(so that I can debug) if we fill MyFirstFieldAutocomplete first.)


**************CODE******************************

 jQuery(document).ready(function(){
    jQuery.ui.autocomplete.prototype._renderItem = function( ul, item) {
          var re = new RegExp(this.term, "i") ;
          var t = item.label.replace(re,"<span style='font-weight:bold;color:Blue;'>" + this.term + "</span>");
          return jQuery( "<li></li>" )
              .data( "item.autocomplete", item )
              .append( "<a style='cursor: pointer; background-color:white;'>" + t + "</a>" )
              .appendTo( ul );
    };
    
    jQuery('.MyFirstFieldAutocomplete, .MySecondFieldAutocomplete, .MyThirdFieldAutocomplete, ').each(function(){
        var thisInput = this;
        
        console.log('this' + this);
        jQuery(this).autocomplete({
            minLength: 2,            
            source: function(request, response) {  
                queryTerm = request.term;
                console.log('queryTerm ' + queryTerm );
                
                var filterValue = '';
                var searchObject = '';
                var fieldList = '';
                var filterField = '';
                
                if(jQuery(thisInput).hasClass('MyFirstFieldAutocomplete')){
                    filterValue = 'First RecordType';
                    searchObject = 'Account';
                    fieldList = 'BillingCountry';
                    filterField = 'recordtype.name';
                }else{
                    if(jQuery(thisInput).hasClass('MySecondFieldAutocomplete')){
                        filterValue = 'SecondFilter';
                    }
                    searchObject = 'CustomObject__c';
                    filterField = 'customField__c';                
                }
                
                if(jQuery(thisInput).hasClass('MyThirdFieldAutocomplete')){
                    filterValue = 'Third RecordType';
                    searchObject = 'Account';
                    fieldList = 'BillingCountry';
                    filterField = 'recordtype.name';
                    alert('High School');
                    console.log(filterValue, searchObject, fieldList, filterField);
                    console.log('Test2');
                    console.log('queryTerm inside MyThirdField' + queryTerm );
                }
                
                console.log(filterValue, searchObject, fieldList, filterField);
                
                myClassController.getAutoCompleteList(filterValue, request.term, searchObject, fieldList, filterField, 
                    function(result, event){
                    if(event.type == 'exception'){
                        alert(event.message);
                    }else{
                        sObjects = result;
                        response(sObjects);
                    }
                });
            },
            select: function(value, data){
                if (typeof data == "undefined") {
                    this.value= value;
                }else{
                    lookupPick2('formId',this.id+'_lkid',this.id,data.item.recordId,htmlDecode(data.item.name),false);
                }
                return false;
            }
        });             
    });
});


<td>
   <apex:inputField value="{!lstCustomObjNew.customFieldLookup__c}" id="thirdId" styleClass="MyThirdFieldAutocomplete"/>
</td>


Any help would be appriciated.


Regards,
Ritik
  • July 20, 2015
  • Like
  • 0
Hi,

Is there any possible method by which I can format the UI of error message in a trigger?

Scenerio:
I have to display the error when a person clicks "Save" (standard button) on a Custom Object's standard edit page layout.
For this I have written a trigger (trigger.New.addError(......)).
Here, I have to display a table (which will show all the values coming from a list.)
If not possible, I have to display values of atleast one field in different rows.
For this I have written

errorMsg = 'Following possible duplicates are present: ';
for(integer i=0 ; i < myListVar.size(); i++){
          errorMsg +=  myListVar[i].name + '\n';
}
Trigger.new[0].addError(errorMsg);


But it is not working. The whole text is coming in one line. (Although in debug log it is coming in different lines.)
Instead of \n I have also tried \r\n.

So, please tell me a method by which I can display the error mesaage in a better way.
If possible, I also want a hyperlink in names in error  message.

 
Thanks,
Ritik
  • July 06, 2015
  • Like
  • 0
Hi,

How can I check a particular field's dependencyin the org.

To ensure dependency I have tried to delete the field but it is not the foolproof solution as some dependecies, like reports etc., are not getting covered in that.

SO what is method by which I can garuntee that a metadata (especially a field) is used /have dependency in all other metadata?

Eg: A field XYZ is used in a class, VF page, validation rule, report etc.
So I need the list wherever this XYZ field is used.


Hope my query is clear, but do let me know if any further information is required.


Thanks,
Ritik


 
  • June 18, 2015
  • Like
  • 0
Hi,

I have a field of data type Long Text Area wherein I have some data in below mentioned format. Here I have to mask some text (not everything) from this data (Please refer the example below ). Can anybody help me in achieving this or atleast tell me the appropriate approach for this.


Example:
Sample Input (Data in in the LONG TEXT AREA field):

Name     : ABCDEF
Age        : 20 Years
Email    : testEmail@test.com
Body    : This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.
          This is a sample text. This is a sample text. This is a sample text. This is a sample text.
Some Other Data: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
DOB        : 01-01-1905
Some Other Data1: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data2: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data3: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data4: This is a sample text. This is a sample text. This is a sample text. This is a sample text.


Sample Output (which is required)
Name     : XXXXXX
Age        : XX Years
Email    : XXXXXXXXX@XXXX.XX
Body    : This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.
          This is a sample text. This is a sample text. This is a sample text. This is a sample text.
Some Other Data: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
DOB        : XX-XX-XXXX
Some Other Data1: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data2: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data3: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data4: This is a sample text. This is a sample text. This is a sample text. This is a sample text.      



Here name, age, dob etc. are masked.

Any help would be great.



Regards,
Ritik
  • June 08, 2015
  • Like
  • 0
Hi,

Has any body done any integration with Sunstone analytics.
If yes please let me know.
Let me know if there are any APIs available or is there any tool or anything else available to integrate that with salesforce.


Regards,
Ritik
  • June 04, 2015
  • Like
  • 0
Hi,

I need to Integrate youtube search engine in my visualforce page. So that whenener the user searches the video in search bar, he should get a list of videos present in youtube (same as in youtube website). After that when he clicks one of the video of the list, he should be redirected to that video in youtube.

I have tried an example given in https://developers.google.com/youtube/v3/code_samples/javascript but I'm not able to make it workable.
Any help would be highly appriciated.
Please treat it as urgent.

Thanks in advance! :)

Regards,
R_Shri
  • May 20, 2014
  • Like
  • 2