• Animesh Datta
  • NEWBIE
  • 10 Points
  • Member since 2015

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

I have a Download button on a lightning component. On click of the button I am calling external system to fetch attachment. I am getting response in json format. I need help from here. On click of the button attachment should be downloaded without storing inside Salesforce.

Could you help on this.
Hi,

Can anyone help me with sample test class or approach for test class of Wave dataset. My dataset id in original class is kept in custom metadata. I need to understand how to create data in test class and pass it to the saql query.

Regards,
Animesh
Hi,

In order remove duplicate records, I converted List to Set and converted same set to list. But, converted list still is giving duplicate records. Please assist.
List<Property__c> propertyList = new List<Property__c>();
	Set<Property__c> propertySet = new Set<Property__c>();
	//propertySet //unique
	
	for(Property__c prop : propertySet){		
				propertyList.add(prop);
        }
		system.debug('>>>>>propertySet'+propertySet);//unique
		system.debug('propertyList++++++'+propertyList) //duplicate records
		Database.update(propertyList,false);//duplicate id in list



Regards,
Animesh
Hi,

We have requirement to take copy of deleted feeditem and its comments. As casedelete does not work, we are deleting feedcomments using feeditem trigger. It works only for system admin, but does not work for other users as they do not have "View All Data" permission (Only Admin or users with View All Data permission can query on feedcomment). So is there any way to avoid querying feedcomment while feeditem is fired.

Regards,
Animesh
 
colGrpMemberMap = new Map<Id, List<CollaborationGroupMember>>();

for(ID groupId: colGrpMemberMap.keySet()){
                ConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();
                    //ConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();
                    feedItemInput.body = messageInput;
                    feedItemInput.feedElementType = ConnectApi.FeedElementType.FeedItem;
                    feedItemInput.subjectId = colGrpMemberMap.get(groupId);
                    for(CollaborationGroupMember grpMemberId : colGrpMemberMap.get(groupId)){
                            ConnectApi.MentionSegmentInput mentionSegment = new ConnectApi.MentionSegmentInput();
                            //feedItemInput.subjectId = grpMemberId.CollaborationGroupId;
                            mentionSegment.id = grpMemberId.MemberId ;
                            messageInput.messageSegments.add(mentionSegment);
                    
                    } 
 
                    ConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput, null);
                }
Hi,

can you please tell me how to get Map id in bold line. I am unable to get map id in outer for loop.

Regards,
Animesh
 
Hi,

I need to create chatter feed post to a private chatter group with @mention all members in the group in a single post. Any suggestions please? I am able to mention only single user in each post but unable to include all users@mention in a single post.

Kindly help!

Regards,
Animesh
Hi,
I am working on a batch class to delete records created 30 days ago.
using the below query but it is not working. Kindly help.

Regards,
Animesh
select id from BU_Monitors_Opportunity__c where CreatedDate < system.today().addDays(-30)

 
Hi,
I am putting one validation for 3 phone number fields in community. User can not add characters except ( )  - space and number.
Pleasse help on this. here is the sample code.
Pattern p = Pattern.compile('(REGEX(Phone, "^(?=.*?[1-9])[0-9()-]+$"))');
Matcher otherphone;
Boolean isPhoneError = false;
	if (newUserContact.otherphone != null && newUserContact.otherphone != ''){
		otherphone = p.matcher( (string)newUserContact.otherphone);
		if(otherphone.matches()){
			isPhoneError = true;
		}
	}			
		if(isPhoneError)
			{
				ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, system.label.PhoneInvalid);
				ApexPages.addMessage(msg);
				return false;
			}

 
Hi,
I have Custom Email button in a Custom object. I am using standard emailAuthor page in this button. After sending email using buttton, Activity history of Case is getting updated with the email. For this I have written a trigger on Activity to swap activity. Now I need to populate the Email relatedlist of case also while sending email from the custom button of custom object. Here Case is lookup in the custom object.

Kindly help!!!!!

Regards,
Animesh
Hi,

I am trying to populate TO field in Email author as Account Name in a Custom Object. But To field is populating as blank. Below is the code sample. Kindly Help!!!!
/***Account_1_Id__c(getting account id) is a formula field on Offer__c and Account is lookup in Offer__c*****/


('/_ui/core/email/author/EmailAuthor?/p2_lkid={!Offer__c.Account_1_Id__c}&rtype=003&retURL=%2F{!Offer__c.Id}&p3_lkid={!Offer__c.Id}');

Regards,
Animesh
Hi,
I have a InputText field in Page <apex:inputText value="{!Coupon}"/>.
I need to make Special Characters to Null value while User typing special charaters in the free text box.

Kindly Help!

Regards,
Animesh
Hi,
we have On click Javascript custom button on a Standard Page Layout. On click of this button we are calling an apex class to generate URL according to the parameter of an external system. URL comes to the button and we encode the parameter' value and copied to clipboard. Now we want to store this URL in a custom field instead of copying to clipboard. Could you please suggest any solution/approach for the same.

Please help!
Hi,

I have a Object Asset_Search. It has one date time field Futute_Remote_DateTime which can set manually set by Agent. I need to blank out this date/time field when Present datetime becomes equals or Greater compared to Future Remote DateTime. I tried with Workflow rules. But it is not working.

Kindly Help!

Regards,
Animesh
Hi All,

I have a button on Case Layout. On click of this button Visualforce page opens up in a new window. there is one button one button "OK" on the VF page. on click of this Command button VF page closes and few fields are updating back to Case. I can see fields are updating when I refresh the Case manually. I want refresh case automatically while clicking on the "OK" button and page closes.

Note: I am not using Service Console.

Kindly Help!!

Regards,
Animesh
Hello,

I want to open a Visualforce page in a new window onclick of a Custom button which is on Standard Case Layout details page. But Onclick of this button, Page is opening up always in new tab in all browsers, but I need a new Window. Please help.

Onclick Javascript for Custom Button on Case Layout: window.open('/apex/myAccountCasepage?id={!Case.Id}');

Note: I am not using any service console.
Hi,

I have a Download button on a lightning component. On click of the button I am calling external system to fetch attachment. I am getting response in json format. I need help from here. On click of the button attachment should be downloaded without storing inside Salesforce.

Could you help on this.
Hi,

In order remove duplicate records, I converted List to Set and converted same set to list. But, converted list still is giving duplicate records. Please assist.
List<Property__c> propertyList = new List<Property__c>();
	Set<Property__c> propertySet = new Set<Property__c>();
	//propertySet //unique
	
	for(Property__c prop : propertySet){		
				propertyList.add(prop);
        }
		system.debug('>>>>>propertySet'+propertySet);//unique
		system.debug('propertyList++++++'+propertyList) //duplicate records
		Database.update(propertyList,false);//duplicate id in list



Regards,
Animesh
Hi,

We have requirement to take copy of deleted feeditem and its comments. As casedelete does not work, we are deleting feedcomments using feeditem trigger. It works only for system admin, but does not work for other users as they do not have "View All Data" permission (Only Admin or users with View All Data permission can query on feedcomment). So is there any way to avoid querying feedcomment while feeditem is fired.

Regards,
Animesh
 
colGrpMemberMap = new Map<Id, List<CollaborationGroupMember>>();

for(ID groupId: colGrpMemberMap.keySet()){
                ConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();
                    //ConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();
                    feedItemInput.body = messageInput;
                    feedItemInput.feedElementType = ConnectApi.FeedElementType.FeedItem;
                    feedItemInput.subjectId = colGrpMemberMap.get(groupId);
                    for(CollaborationGroupMember grpMemberId : colGrpMemberMap.get(groupId)){
                            ConnectApi.MentionSegmentInput mentionSegment = new ConnectApi.MentionSegmentInput();
                            //feedItemInput.subjectId = grpMemberId.CollaborationGroupId;
                            mentionSegment.id = grpMemberId.MemberId ;
                            messageInput.messageSegments.add(mentionSegment);
                    
                    } 
 
                    ConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput, null);
                }
Hi,

can you please tell me how to get Map id in bold line. I am unable to get map id in outer for loop.

Regards,
Animesh
 
Hi,

I need to create chatter feed post to a private chatter group with @mention all members in the group in a single post. Any suggestions please? I am able to mention only single user in each post but unable to include all users@mention in a single post.

Kindly help!

Regards,
Animesh
We have a legal requirement to backup copies of some users chatter posts when those posts are deleted.  I have created a new trigger to write out feeditem and feedcomment objects to a custom object when they are deleted, and its working well.  It runs after delete on FEEDITEM (a chatter post basically) and FEEDCOMMENT (chatter comment on a chatter post).

Chatter post = FEEDITEM record (parent)
  > Chatter comment = FEEDCOMMENT record (child)

All works as expected, but when a chatter post is deleted in the UI (and thus the comments are deleted via cascade delete) the trigger on FEEDCOMMENT does not fire.  This appears to be documented, but is a major limitation for me.  

Can anyone suggest a workaround?
 
Hi,

I am trying to populate TO field in Email author as Account Name in a Custom Object. But To field is populating as blank. Below is the code sample. Kindly Help!!!!
/***Account_1_Id__c(getting account id) is a formula field on Offer__c and Account is lookup in Offer__c*****/


('/_ui/core/email/author/EmailAuthor?/p2_lkid={!Offer__c.Account_1_Id__c}&rtype=003&retURL=%2F{!Offer__c.Id}&p3_lkid={!Offer__c.Id}');

Regards,
Animesh
Hi,
I have a InputText field in Page <apex:inputText value="{!Coupon}"/>.
I need to make Special Characters to Null value while User typing special charaters in the free text box.

Kindly Help!

Regards,
Animesh
Hi,
we have On click Javascript custom button on a Standard Page Layout. On click of this button we are calling an apex class to generate URL according to the parameter of an external system. URL comes to the button and we encode the parameter' value and copied to clipboard. Now we want to store this URL in a custom field instead of copying to clipboard. Could you please suggest any solution/approach for the same.

Please help!
Hi All,

I have a button on Case Layout. On click of this button Visualforce page opens up in a new window. there is one button one button "OK" on the VF page. on click of this Command button VF page closes and few fields are updating back to Case. I can see fields are updating when I refresh the Case manually. I want refresh case automatically while clicking on the "OK" button and page closes.

Note: I am not using Service Console.

Kindly Help!!

Regards,
Animesh
Hello,

I want to open a Visualforce page in a new window onclick of a Custom button which is on Standard Case Layout details page. But Onclick of this button, Page is opening up always in new tab in all browsers, but I need a new Window. Please help.

Onclick Javascript for Custom Button on Case Layout: window.open('/apex/myAccountCasepage?id={!Case.Id}');

Note: I am not using any service console.

Hi Friends

 

I have attached the  Visual force Snippet in one custom object. The  Visual force snippet information will stored in one object. This object  have master detailed relationship with  above object. 

 
If I click the save button in the visual force snippet , the information will saved into the child object. After refresh the page manually  I can see the child object information. some information will update into parent object.  I would like to refresh the whole page when click the save button in the Visual force snippet. please any one Suggest me to resolve this requirement 
 

 

Thanks

Sundar