- Sai Ram A
- SMARTIE
- 631 Points
- Member since 2012
- Salesforce Developer/ Technical Lead
- Birlasoft
-
ChatterFeed
-
16Best Answers
-
6Likes Received
-
4Likes Given
-
20Questions
-
133Replies
Create an Indirect Lookup Relationship: Lightning Connect
Quick Start: Lightning ConnectCreate an Indirect Lookup Relationship
-
- farouk fakunle
- August 02, 2015
- Like
- 0
- Continue reading or reply
WorkFlow related Queries
I am from Payment/Payroll agent tools. There are many workflows supported by Case 360 for maintaing the case life cyle for any request. I wanted to understand what type of workflows salesforce support and How extensive is it ?
Please somebody help me in this regard.
Thanks & Regards
Saurabh
-
- Saurabh Shekhar 1
- March 02, 2015
- Like
- 0
- Continue reading or reply
System.QueryException: unexpected token: 10
public class ContactsListController{
private string sortOrder = 'LastName';
public List<Contact> getContacts(){
string soqlQuery = 'SELECT Id, FirstName, LastName, Title, Email'+ 'from Contacts'+ 'OrderBy' + sortOrder
+ 'ASC' + 'LIMIT 10' ;
List<Contact> results = Database.query(soqlQuery);
return results;
}
}
And this is my visualforce page :
<apex:page controller="ContactsListController" >
<apex:form >
<apex:pageBlock title="Contacts List" id="Contacts_list">
<apex:pageBlockTable value="{!Contacts}" var="ct">
<apex:column value="{!ct.FirstName}"/>
<apex:column value="{!ct.LastName}"/>
<apex:column value="{!ct.Title}"/>
<apex:column value="{!ct.Email}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
I'm getting an error "System.QueryException: unexpected token: 10 " while saving the above vf page. Please help.
-
- Raksha Tiwari
- February 25, 2015
- Like
- 0
- Continue reading or reply
Workflow and Rules
I need to update the Stage Name for the most recent opportunity when any updates has been made in Account Program Status.. I want to achieve it through workflows. Is it possible?
Eg: Account Program Status = "On Hold", then change Opportunity Stage Name = "On Hold"
Thanks,
Vetriselvan M
-
- Vetriselvan Manoharan
- January 23, 2015
- Like
- 0
- Continue reading or reply
Force.com site license
https://www.dropbox.com/s/so5qv9pmg9kulra/Screenshot%202014-12-29%2011.53.11.png?dl=0
Apparently, when we login to our non-profit instance, we can create new site. Please let me know what do I need to do create site?
-
- Unmesh Sheth 1
- December 29, 2015
- Like
- 0
- Continue reading or reply
Having issue in trailhead challenge under Formulas & Validations task.
ERROR:
Challenge not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Contact_must_be_in_Account_ZIP_Code: []
CHALLENGE:
Create a validation rule to check that a contact is in the zip code of its account.
To complete this challenge, add a validation rule which will block the insertion of a contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).Name the validation rule 'Contact must be in Account ZIP Code'.
A contact with a MailingPostalCode that has an account and does not match the associated Account ShippingPostalCode should return with a validation error and not be inserted.
The validation rule should ONLY apply to contact records with an associated account. Contact records with no associated parent account can be added with any MailingPostalCode value. (Hint: you can use the ISBLANK function for this check)
And i used below formula in validation Rule:
AND(ISBLANK( Account.Name ), MailingPostalCode <> Account.ShippingPostalCode )
-
- NAVEEN KUMAR
- December 29, 2015
- Like
- 0
- Continue reading or reply
How to install eclipse for salesforce in my system
How to install eclipse for salesforce in my system...
-
- Parteek Goyal 3
- December 23, 2014
- Like
- 0
- Continue reading or reply
How to deploy a application in salesforce...
How to deploy a application in salesforce...
-
- Parteek Goyal 3
- December 23, 2014
- Like
- 0
- Continue reading or reply
-
- Nallareddy
- December 23, 2014
- Like
- 0
- Continue reading or reply
Automating Processes with Workflow - Set Case to Escalated
Challenge not yet complete... here's what's wrong:
The 'Set Case to Escalated' Workflow field update action was not found.
I even tested and confirmed that the workflow rule works and all of the required actions have been created and completed per the instructions of the module. A bug on the challenge verification perhaps?
-
- Cody Girod
- December 17, 2014
- Like
- 0
- Continue reading or reply
object field in activities
IF(
BEGINS(WhatId, “006″), “Opportunity”,
IF(
BEGINS(WhatId, “001″), “Account”,
IF(
BEGINS(WhoId, “00Q”), “Lead”,
IF(
BEGINS(WhoId, “003″), “Contact”,””))))
-
- Prasanth Reddy M
- July 28, 2014
- Like
- 0
- Continue reading or reply
Communication Between JSON String and JavaScript in Visualforce page
I have a Simple controller returns list of Accounts in JSON String format, I have structured well to map with Script in vf page. But i m unable map in Script in visualforce page. Please suggest
Please click here to see the screenshot of requirement https://developer.salesforce.com/forums/ForumsMain?id=906F0000000B3tpIAC
<apex:page controller="JSONGeneratorController" docType="HTML-5.0" > <apex:stylesheet value="{!URLFOR($Resource.JQueryDataTable, '/css/jquery.dataTables.css')}"/> <!-- jQuery library --> <apex:includeScript value="{!URLFOR($Resource.JQueryDataTable, '/jquery.dataTables.min.js')}"/> <apex:includeScript value="{!URLFOR($Resource.JQueryDataTable, '/jquery-1.11.1.min.js')}"/> <script> /* Formatting function for row details - modify as you need */ function format ( d ) { // `d` is the original data object for the row return '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">'+ '<tr>'+ '<td>Account Type:</td>'+ '<td>'+d.acctType+'</td>'+ '</tr>'+ '<tr>'+ '<td>Revenue:</td>'+ '<td>'+d.revenue+'</td>'+ '</tr>'+ '<tr>'+ '<td>Extra info:</td>'+ '<td>And any further details here (images etc)...</td>'+ '</tr>'+ '</table>'; } function buildAccountsTable(){ var j$ = jQuery.noConflict(); var allAccounts = {!jsonDataAllAccounts}; // This return the Accounts in JSON Format $(document).ready(function() { var table = $('#example').DataTable( { "ajax": allAccounts , //Passing list Account variable to build Rows "columns": [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { "data": "name" }, { "data": "industry" }, { "data": "owner" }, { "data": "rating" } //{ "data": "acctType" }, //{ "data": "revenue" }, { "data": "numberOfEmployees" } ], "order": [[1, 'asc']] } ); // Add event listener for opening and closing details $('#example tbody').on('click', 'td.details-control', function () { var tr = $(this).closest('tr'); var row = table.row( tr ); if ( row.child.isShown() ) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); } else { // Open this row row.child( format(row.data()) ).show(); tr.addClass('shown'); } } ); } ); } </script> <apex:form > <apex:outputPanel id="allAccountTables"> <table id="allAccounts" class="display" cellspacing="0" style="width:90%; padding-bottom:10px; border-style:solid;"> <thead> <tr> <th style="width: 25%;">Name</th> <th>Industry</th> <th>Owner</th> <th style="width: 13%;">Rating</th> <th>Type</th> <th>AnnualRevenue</th> <th>NumberOfEmployees</th> </tr> </thead> </table> </apex:outputPanel> <apex:pageBlock > {!jsonDataAllAccounts} </apex:pageBlock> </apex:form> </apex:page>
Apex Controller Class
public with sharing class JSONGeneratorController { public String jsonString { get; set; } public List<Account> accontList {get; set;} //define shape of Json Response salesforce public JSONGeneratorController (){ jsonString = Json.SerializePretty(getAccountList()); system.debug(jsonString); } //List of Accounts & its accociated Contacts should be displayed on click on + image public static List<Account> getAccountList(){ return ([SELECT Id, Name, OwnerId, Owner.Name, Ownership, Industry, AnnualRevenue, Type, Rating, NumberOfEmployees, (SELECT FirstName, LastName FROM Contacts WHERE AccountId != null) FROM Account ORDER BY Name ASC LIMIT 10]); //return ([SELECT Id, Name,Phone, OwnerId, Owner.Name, Ownership, Industry, AnnualRevenue, Type, Rating, NumberOfEmployees FROM Account ORDER BY Name ASC LIMIT 10]); } //Wrapper class public class DataTableRow { public String name { get; set; } public String industry { get; set; } public String owner { get; set; } public String rating { get; set; } public String ratingFlag { get; set; } public Decimal revenue { get; set; } public String revenueFlag { get; set; } public String acctType { get; set; } public Integer numberOfEmployees { get; set; } public Id recordId { get; set; } public DataTableRow(Account acct){ this.name = acct.Name; this.industry = acct.Industry; this.owner = acct.Owner.Name; this.rating = acct.Rating; this.revenue = acct.AnnualRevenue; this.acctType = acct.Type; this.numberOfEmployees = acct.NumberOfEmployees; this.recordId = acct.Id; } } //JSON String public String jsonDataAllAccounts { get { List<DataTableRow> dataRows = new List<DataTableRow>(); if(jsonDataAllAccounts == null){ for(Account acct : [SELECT Id, Name, OwnerId, Owner.Name, Ownership, Industry, AnnualRevenue, Type, Rating, NumberOfEmployees FROM Account ORDER BY Name ASC LIMIT 10]){ dataRows.add(new DataTableRow(acct)); } } jsonDataAllAccounts = JSON.serializepretty(dataRows); system.debug('get set variable'+jsonDataAllAccounts); return jsonDataAllAccounts; } private set; } }
-
- Sai Ram A
- July 24, 2015
- Like
- 0
- Continue reading or reply
SOQL Optimization to reduce time consuming to execute query with OR Filter Condition
Please Suggest the approaches or help in optimizing the Logic/ Query to reduce time Consuming in executing the Order Object Query ( which is taking 10 minutes), this is effecting user experience
//ListMethod public list<orders__c> getstart() { Map<Id,UserTerritory> UserTerritoryCurrentUserMap = new Map<Id,UserTerritory>([Select u.UserId, u.TerritoryId, u.IsActive, u.Id From UserTerritory u Where u.isActive=true and u.userId =: UserInfo.getUserId()]); system.debug('-----UserTerritoryCurrentUserMap SIZE-------'+UserTerritoryCurrentUserMap.size()); set<Id> TerritoryIdSet = new set<Id>(); for(UserTerritory ut:UserTerritoryCurrentUserMap.values()) { TerritoryIdSet.add(ut.TerritoryId); } List<Territory> childTerritories = [Select Id from Territory where ParentTerritoryID in :TerritoryIdSet]; for(Territory ct : childTerritories) { TerritoryIdSet.add(ct.Id); } system.debug('-----TerritoryIdSet -------'+TerritoryIdSet); system.debug('-----TerritoryIdSet SIZE-------'+TerritoryIdSet.size()); list<Group> map_group = [Select Id, RelatedId from Group where (Type='Territory' OR Type='TerritoryAndSubordinates') AND RelatedId IN : TerritoryIdSet]; system.debug('-----map_group -------'+map_group); Set<String> tempList = new Set<String>(); for(My_Custom_Object__c s : [SELECT Legacy_Field__c , Account__c FROM My_Custom_Object__c WHERE Account__c IN (Select AccountId FROM AccountShare where ( UserOrGroupId IN : map_group OR UserOrGroupId =:UserInfo.getUserId()) AND RowCause IN ('Territory', 'TerritoryManual', 'TerritoryRule')) ]) { tempList.add(s.Legacy_Field__c); } system.debug('-----tempList-------'+tempList); system.debug('-----tempList-------'+tempList.size()); List<orders__c> orders =[SELECT id, Name, Orders__c, Bill_to__c, Payer__c, Ship_To__c, Sold_to__c FROM orders__c WHERE Bill_to__c IN: tempList OR Payer__c IN: tempList OR Ship_To__c IN: tempList OR Sold_to__c IN: tempList]; system.debug('-----orders-------'+orders); return orders; }
How to Optimize below Query
List<orders__c> orders =[SELECT id, Name, Orders__c, Bill_to__c, Payer__c, Ship_To__c, Sold_to__c FROM orders__c WHERE Bill_to__c IN: tempList OR Payer__c IN: tempList OR Ship_To__c IN: tempList OR Sold_to__c IN: tempList]; system.debug('-----orders-------'+orders);
Thank you in Advance
-
- Sai Ram A
- July 10, 2015
- Like
- 0
- Continue reading or reply
Surprised with Catter Module in Trailhead :)
Thank you
BLearn - Sai
-
- Sai Ram A
- April 02, 2015
- Like
- 5
- Continue reading or reply
Alert or Popup message while posting to Chatter
Would really appreciate if you could hsare your thoughts
-
- Sai Ram A
- March 04, 2014
- Like
- 1
- Continue reading or reply
Approve list of Records in a single button click- Approve
I would appreciate if someone would help me in achieving this
This is custom approval process
List of records in Table are child records of Quote. Clik Here Existing Look & Feel
Existing functionality - on Click of Approve Button That particular Row will be updated, In code we are passing the Id through Param
<apex:form > <apex:pageBlock title="Custom Approval" id="pg"> <apex:pageBlockButtons location="top"> <apex:commandButton value="Manual Add" /> <apex:commandButton value="Send All"/> <apex:commandButton value="Remove All"/> </apex:pageBlockButtons> <apex:pageBlockSection id="pgs" columns="1"> <apex:pageBlockTable value="{!childRecs1}" var="temp" id="pgt"> <!--<apex:column value="{!temp.Name}" breakBefore="true">--> <apex:column headerValue="Name"> <apex:outputLink value="/{!temp.Id}" target="_top"> <apex:inputField value="{!temp.Name}"/> </apex:outputLink> </apex:column> <apex:column value="{!temp.Approval__Step_Name__c}" headerValue="Rule" /> <apex:column value="{!temp.Approval__Assigned_To_Name__c}" headerValue="Assigned To" /> <apex:column value="{!temp.Approval__Status_Link__c}" headerValue="Status"/> <apex:column value="{!temp.Approval__Action__c}" headerValue="Approval Action" /> <apex:column value="{!temp.Approval__Approver_Comments__c}" headerValue="Approver Comments"/> <apex:column > <apex:commandButton value="Send Now"/> </apex:column> <apex:column > <apex:commandButton value="Remind"/> </apex:column> <apex:column > <apex:commandButton value="Approve" action="{!Approve}" reRender="pg"> <apex:param value="{!temp.id}" name="CurrentPageName1" assignTo="{!CurrentPageName}"/> </apex:commandButton> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> </apex:pageBlock> </apex:form>
public class QuoteApprove { public List<Approval__Approval_Request__c>childRecs1 {get;set;} public Proposal__Proposal__c appQuote; public Approval__Approval_Request__c appr {get; set;} public String CurrentPageName {get; set;} //Constructor public QuoteApprove(ApexPages.StandardController controller) { appQuote = new Proposal__Proposal__c (id=Apexpages.currentPage().getParameters().get('id')); Proposal__Proposal__c cpqna = [SELECT Id, (SELECT Id, Approval__Approver_Comments__c, Approval__Step_Name__c, Approval__Assigned_To_Name__c,Name, Approval__Approval_Status__c , Approval__Action__c, Approval__Status_Link__c From QPApprov__ApprovalRequests__r) FROM Proposal__Proposal__c WHERE ID =:accid]; childRecs1 = new List<Approval__Approval_Request__c>(); childRecs1 = cpqna.QPApprov__ApprovalRequests__r; } public String accid = System.currentPagereference().getParameters().get('id'); //this method returns the list of Approval records associated to Quote public PageReference Approve() { System.debug('sgfsdfjsfdj:::::::::::::'+CurrentPageName); Approval__Approval_Request__c appr = [SELECT id, Approval__Approval_Status__c, Approval__DateApproved__c FROM Approval__Approval_Request__c Where id=:CurrentPageName limit 1]; appr.Approval__DateApproved__c = datetime.Now(); appr.Approval__Approval_Status__c = 'Approved'; update appr ; //PageReference nextPage =page.QuoteApproveSatya; PageReference nextPage = new PageReference('/apex/Quote_detail_approval?id='+appQuote.id); nextpage.setRedirect(true); return nextPage; } }
Expecting functionality - If Single user have more than 1 record to approve, he should be able to approve list of records in a single click.
Queries - How to update list of child records in a single action
How to show button once for list of records, Rather showing buttons in every single row?
-
- Sai Ram A
- June 29, 2013
- Like
- 0
- Continue reading or reply
Learning: Create Custom save method for a simple Object with VF page & Custom Controller
Hope this Helps!! Custom Save Method for an simple Object. Create a custom Object Books with fields LabelName DataType Name Text(255) Author Text(255) Email Email Address Textarea(5000) Visualforce Pagge <apex:page controller="SaveBook"> <apex:form > <apex:pageBlock > <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!SaveRecord}"/> <apex:commandButton value="Cancel" action="{!CancelRecord}"/> </apex:pageBlockButtons> <apex:pageBlockSection columns="1"> <apex:pageBlockSectionItem > <apex:outputLabel >Book Name</apex:outputLabel> <apex:inputField value="{!BK.name}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel >Author</apex:outputLabel> <apex:inputField value="{!BK.Author__c}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel >Email</apex:outputLabel> <apex:inputField value="{!BK.Email_ID__c}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel >Address</apex:outputLabel> <apex:inputField value="{!BK.Address__c}"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page> //Custom Controller public class SaveBook { public SaveBook(){ Bk = New Book__c(); } public Book__c Bk {get; set;} //Save Method //This custom Controller method // runs similar as Standard save method (Button) //Created Just for learning public PageReference Saverecord() { Book__c Book1 = new Book__c(); Book1.Name = Bk.Name; Book1.Author__c = Bk.Author__c; Book1.Email_id__c = Bk.Email_id__c; Book1.Address__c = Bk.Address__c; insert Book1; return(new PageReference('/'+Book1.id).setRedirect(True)); } //Cancel //Similarly works as Standard Buttons Public PageReference Cancelrecord(){ return (new PageReference('/a04/o').setRedirect(True)); } }
-
- Sai Ram A
- April 27, 2013
- Like
- 0
- Continue reading or reply
Omniture tool and how it compatible on Salesforce.com
-
- Sai Ram A
- January 11, 2013
- Like
- 0
- Continue reading or reply
Decode the code to add it to attachments object (Infopath form)
Quick response is much appreciated!!
Infopath form (MS Office) is sending an attacments in the below format. How can i convert it into appropriate format file?
<my:File>x0lGQRQAAAABAAAAAAAAACsiAAAKAAAAdABlAHMAdAAuAHgAbABzAHgAAABQSwMEFAAGAAgAAAAhAHxsmBZsAQAAoAUAABMACAJ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AAAACEA3gn9KAIBAADUAwAAGgAAAAAAAAAAAAAAAADLBgAAeGwvX3JlbHMvd29ya2Jvb2sueG1sLnJlbHNQSwECLQAUAAYACAAAACEA6tJTQ2sBAACDAgAADwAAAAAAAAAAAAAAAAANCQAAeGwvd29ya2Jvb2sueG1sUEsBAi0AFAAGAAgAAAAhAPtipW2UBgAApxsAABMAAAAAAAAAAAAAAAAApQoAAHhsL3RoZW1lL3RoZW1lMS54bWxQSwECLQAUAAYACAAAACEAfsGK5WABAAB0AgAAGAAAAAAAAAAAAAAAAABqEQAAeGwvd29ya3NoZWV0cy9zaGVldDIueG1sUEsBAi0AFAAGAAgAAAAhAH7BiuVgAQAAdAIAABgAAAAAAAAAAAAAAAAAABMAAHhsL3dvcmtzaGVldHMvc2hlZXQzLnhtbFBLAQItABQABgAIAAAAIQCMJde6uQEAADADAAAYAAAAAAAAAAAAAAAAAJYUAAB4bC93b3Jrc2hlZXRzL3NoZWV0MS54bWxQSwECLQAUAAYACAAAACEAT5l7u6AAAADGAAAAFAAAAAAAAAAAAAAAAACFFgAAeGwvc2hhcmVkU3RyaW5ncy54bWxQSwECLQAUAAYACAAAACEAlDfh7UcCAADsBAAADQAAAAAAAAAAAAAAAABXFwAAeGwvc3R5bGVzLnhtbFBLAQItABQABgAIAAAAIQDDKgN+kwEAAEcDAAAQAAAAAAAAAAAAAAAAAMkZAABkb2NQcm9wcy9hcHAueG1sUEsBAi0AFAAGAAgAAAAhAKFAWjhAAQAAUQIAABEAAAAAAAAAAAAAAAAAkhwAAGRvY1Byb3BzL2NvcmUueG1sUEsFBgAAAAAMAAwADAMAAAkfAAAAAA==</my:File>
-
- Sai Ram A
- December 14, 2012
- Like
- 0
- Continue reading or reply
Upload different formats of files into CONTENT VERSION - Library
*********VF Page***************
<apex:page controller="uploadFile">
<apex:messages />
<apex:form enctype="multipart/form-data" >
<apex:pageBlock title="Contribute Content" >
<apex:commandbutton action="{!upload}" value="Publish" status="status"/>
<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem >
<apex:outputLabel > Title </apex:outputLabel>
<apex:inputTextarea value="{!title}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
title
<apex:inputFile value="{!file}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
*********Apex Class************
public class uploadFile {
public blob file { get; set; }
public String title{get;set;}
public ContentVersion cv { get; set; }
public PageReference upload() {
ContentVersion cv = new ContentVersion();
cv.versionData = file;
cv.title = title;
cv.pathOnClient ='/test img.jpeg';
cv.FirstPublishLocationId = '01dfr000000000gA'; //Change id
try
{
insert cv;
system.debug('*********************Result'+cv.pathonClient);
}
catch (DMLException e)
{
ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error uploading Document in Library'));
return null;
}
finally
{
cv= new ContentVersion();
}
ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Document uploaded successfully to library'));
return null;
}
}
My question Here is i could only upload jpeg files , and can see preview in library.
What if want to upload different formats of files...like pdf, csv, doc, txt jpeg, png etc....
Please help me wit this.. I would really appreciate for Quick response
Thanks
-
- Sai Ram A
- October 31, 2012
- Like
- 0
- Continue reading or reply
Getting Error message while record is created through inbound email
Scenarion to understand: lets say 5 emails of same format sent to salesforce address, 3 got created and 2 getting Bounced.
The error message i am receving in my mail is
cleanup of your mailbox.
2 item(s) were deleted from the System Cleanup/Inbox folder.
1 item(s) were moved from the /Inbox folder to the System Cleanup folder.
For additional information contact your Business Help Desk.
-
- Sai Ram A
- October 10, 2012
- Like
- 0
- Continue reading or reply
How to restrict the User to write into publicGroup only through UI
Hi All
- The ACB Public chatter group how can we disable the capability for a user to Post new feed.
- Post feed are only created though the workflow. How can we handle this
the below code doesnot allows user to write post in public group
trigger RestrictChatterPost on FeedItem (Before Insert)
{
CollaborationGroup lstgroup = [SELECT id, name FROM CollaborationGroup WHERE CollaborationGroup.Name = 'xyz' LIMIT 1];
for(FeedItem a : Trigger.New)
{
if(a.parentid == 'Sfd00000000Ceh3')
a.addError('You are NOT allowed to post in this chatter Group!');
}
}
This code is also restricting to post after the approval process(back end)..
my requirement: I just want to restrict user to write from UI.
Please Suggest me. Thank you
-
- Sai Ram A
- October 05, 2012
- Like
- 0
- Continue reading or reply
Discard the email excess string
In my inbound Email handler class i have a email feild, Sometime i am getting the email field like this
test@gmail.com<mailto:Email=test@gmail.com> in salesforce end and record is not getting created.
I could not figure out why is this happening.
out of this string --> test@gmail.com<mailto:Email=test@gmail.com> how to extract test@gmail.com and insert in my field.
String[] Name = stringTest[1].split(':');
Email = Name[1];
Please help me in figuring out !!
-
- Sai Ram A
- September 27, 2012
- Like
- 0
- Continue reading or reply
Integrating Infopath form with Salesforce
Does SFDC have the capability to extract values from the xml format?
Would like to know more details to directly integrating of Infopath form(Ms office product) via SFDC WEBService.
What is the maximum Size of attachments can be sent to salesforce via Webservice, integration.
Currently receiving through email services using middle layer. maximum size for attachments limit is 10mb.
Lets say ! If integration approach is feasible, What is the maximum attachment size we can insert into salesforce
Also would like to know more on SITE interface of SFDC for collecting non-SFDC user inputs. Limitaions , licences ....???
Responce is much appreciated..
-
- Sai Ram A
- September 24, 2012
- Like
- 0
- Continue reading or reply
Integrating Infopath form with Salesforce
Does SFDC have the capability to extract values from the xml format?
Would like to know more details to directly integrating of Infopath form(Ms office product) via SFDC WEBService.
What is the maximum Size of attachments can be sent to salesforce via Webservice, integration.
Currently receiving through email services using middle layer. maximum size for attachments limit is 10mb.
Lets say ! If integration approach is feasible, What is the maximum attachment size we can insert into salesforce
Also would like to know more on SITE interface of SFDC for collecting non-SFDC user inputs. Limitaions , licences ....???
Responce is much appreciated..
-
- Sai Ram A
- September 24, 2012
- Like
- 0
- Continue reading or reply
Could not achieve Chatter Preview
I have a approval in process to post the attachments to Chatter,
If a record is Approved which is created through UI with attachments, I am able to view the preview of Attachments.
I am not able to see the preview of attachments after approval of records created through inbound email.
Is any thing i need to add in the code or?
public class EmailParsingActivity {
public void attachToRecord(Messaging.InboundEmail.BinaryAttachment[] bAttachments, ID abcdRecId) {
String contents=''; //ok
List<Attachment> listAttach = new List<Attachment>();
if(bAttachments != null) {
for(Messaging.InboundEmail.BinaryAttachment bAttach : bAttachments){ //ok
system.debug('attach file name ' + bAttach.filename);
Attachment attach = new Attachment();
//attach.Body = Blob.valueOf(bAttach.body.toString());
String b64Data = EncodingUtil.base64Encode(bAttach.body);
//Blob bab = bAttach.body;
attach.Body = Blob.valueOf(b64Data);
attach.Name = bAttach.filename; // name of the attachement should be same a attached to email
//attach.parentId = submitRecord.Id;
attach.parentId = abcdRecId;
listAttach.add(attach);
}
system.debug('attach list size ' + listAttach.size());
insert listAttach;
}
}
}
I would appreciate if someone assist me with the solution. Thanks in Advance-----
-
- Sai Ram A
- September 18, 2012
- Like
- 0
- Continue reading or reply
Webpage error details
Website i created within salesforce workfine till yesterday. Since today i am getting an error while i navigate to the pages in IE browser. Can any figure it out and help me in resolving this please.
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Tue, 4 Sep 2012 10:28:54 UTC
Message: 'undefined' is null or not an object
Line: 120
Char: 143
Code: 0
-
- Sai Ram A
- September 04, 2012
- Like
- 0
- Continue reading or reply
Collapse/Expand left panel- urgent Requirement
I have a set of static vf pages .
Creating a Page with left and Right panel.
Trying to achieve this kind of functionality. Left panel should be static (collapse when clicked on category - my personal settings) , when we click on link Appropriate page should appear in right panel.
Quick reply is much appreciated.
<apex:page sidebar="false">
<style type="text/css">
#maindiv {
width:100%;
height:100%;
padding-left:1%;
float:left;
}
#leftPanel {
padding-left:8%;
font-size:18px;
font-weight:bold;
font-family:GE inspira;
color:#33CCFF;
// text-decoration:none;
}
</style>
<apex:form >
<div id="maindiv" >
<apex:pageBlock >
<table width="100%" border="1" >
<tr>
<td width="25%" >
<div id="leftPanel" width="18">
<br/>
<ul>
<apex:pageBlockSection title="title 1" >
<li><apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content1" >A</apex:outputLink><br/></li><br/>
<li><apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content2" >B</apex:outputLink><br/></li><br/>
<li><apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content3" >C</apex:outputLink><br/></li><br/>
<li><apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content4" >D</apex:outputLink><br/></li><br/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Title 2">
<apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content5" >E</apex:outputLink><br/><br/>
<apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content6" >F</apex:outputLink><br/><br/>
</apex:pageBlockSection>
</ul>
</div>
</td>
<td >
</td>
</tr>
</table>
</apex:pageBlock>
</div>
</apex:form>
</apex:page>
-
- Sai Ram A
- August 17, 2012
- Like
- 0
- Continue reading or reply
Static pages navigation - Treeview in left panel. Urgent Requirement
I have a set of static vf pages .
Creating a Page with left and Right panel.
Trying to achieve this kind of functionality. Left panel should be static (collapse when clicked on category - my personal settings in image) , when we click on link Appropriate page should appear in right panel.
Quick reply is much appreciated.
<apex:page sidebar="false">
<style type="text/css">
#maindiv {
width:100%;
height:100%;
padding-left:1%;
float:left;
}
#leftPanel {
padding-left:8%;
font-size:18px;
font-weight:bold;
font-family:GE inspira;
color:#33CCFF;
// text-decoration:none;
}
</style>
<apex:form >
<div id="maindiv" >
<apex:pageBlock >
<table width="100%" border="1" >
<tr>
<td width="25%" >
<div id="leftPanel" width="18">
<br/>
<ul>
<apex:pageBlockSection title="title 1" >
<li><apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content1" >A</apex:outputLink><br/></li><br/>
<li><apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content2" >B</apex:outputLink><br/></li><br/>
<li><apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content3" >C</apex:outputLink><br/></li><br/>
<li><apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content4" >D</apex:outputLink><br/></li><br/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Title 2">
<apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content5" >E</apex:outputLink><br/><br/>
<apex:outputLink style="text-decoration:none; color:#33CCFF;" value="/apex/Content6" >F</apex:outputLink><br/><br/>
</apex:pageBlockSection>
</ul>
</div>
</td>
<td >
</td>
</tr>
</table>
</apex:pageBlock>
</div>
</apex:form>
</apex:page>
-
- Sai Ram A
- August 16, 2012
- Like
- 0
- Continue reading or reply
Inline Edit only 1 specific column in detail page
<apex:detail subject="{Position__c.Id}" relatedList="true" inlineEdit="true"/>
I want to inline edit only 1 specific column when I go to the record detail page.
How can I achieve this. Quick response is much appreciable
Thanks in advance!
-
- Sai Ram A
- August 14, 2012
- Like
- 0
- Continue reading or reply
Access url to Chatter free profile.
I have created an object --> & VF page with input fields and attachment field.
http://learnpublicsite-developer-edition.na9.force.com/learnpublicsite123
Fill the sample form:
user id: 1,234,567,890
pwsd: 123456
I want to add this url in chatter free user profile, because it doesn't require any license.
Can any one help me in achieving this. Thanks in advance
-
- Sai Ram A
- August 13, 2012
- Like
- 0
- Continue reading or reply
Surprised with Catter Module in Trailhead :)
Thank you
BLearn - Sai
-
- Sai Ram A
- April 02, 2015
- Like
- 5
- Continue reading or reply
Alert or Popup message while posting to Chatter
Would really appreciate if you could hsare your thoughts
-
- Sai Ram A
- March 04, 2014
- Like
- 1
- Continue reading or reply
The campingListItem JavaScript controller isn't setting the 'Packed' value correctly.
Working the "Handle Actions with Controllers" trailhead module and I'm not getting past the validation.
If I put the component in a test jig, I can see the button function and set the check box as expected.
Here is the code I'm using to set the item as packed...
component.set("v.item.Packed__c", true );
I'm assuming the validator does not like my syntax. Can you give me a hint to get past this?
Thanks.
John
- John Lay 9
- June 08, 2016
- Like
- 0
- Continue reading or reply
Create an Indirect Lookup Relationship: Lightning Connect
Quick Start: Lightning ConnectCreate an Indirect Lookup Relationship
- farouk fakunle
- August 02, 2015
- Like
- 0
- Continue reading or reply
Lightning App Preview too many redirects error
I'm getting too many redirects error on the page when I preview lightning apps. It was working fine until last night and I'm suddenly getting this, I tried on all different browsers Chrome, Safari, and FireFox without luck. I also tried on incognito window but it didn't help. The app from trailhead tutorial is also displaying the same error when I click preview. Any ideas?
Thanks in advance!
- Seule Ki Kim
- July 31, 2015
- Like
- 1
- Continue reading or reply
SOQL Optimization to reduce time consuming to execute query with OR Filter Condition
Please Suggest the approaches or help in optimizing the Logic/ Query to reduce time Consuming in executing the Order Object Query ( which is taking 10 minutes), this is effecting user experience
//ListMethod public list<orders__c> getstart() { Map<Id,UserTerritory> UserTerritoryCurrentUserMap = new Map<Id,UserTerritory>([Select u.UserId, u.TerritoryId, u.IsActive, u.Id From UserTerritory u Where u.isActive=true and u.userId =: UserInfo.getUserId()]); system.debug('-----UserTerritoryCurrentUserMap SIZE-------'+UserTerritoryCurrentUserMap.size()); set<Id> TerritoryIdSet = new set<Id>(); for(UserTerritory ut:UserTerritoryCurrentUserMap.values()) { TerritoryIdSet.add(ut.TerritoryId); } List<Territory> childTerritories = [Select Id from Territory where ParentTerritoryID in :TerritoryIdSet]; for(Territory ct : childTerritories) { TerritoryIdSet.add(ct.Id); } system.debug('-----TerritoryIdSet -------'+TerritoryIdSet); system.debug('-----TerritoryIdSet SIZE-------'+TerritoryIdSet.size()); list<Group> map_group = [Select Id, RelatedId from Group where (Type='Territory' OR Type='TerritoryAndSubordinates') AND RelatedId IN : TerritoryIdSet]; system.debug('-----map_group -------'+map_group); Set<String> tempList = new Set<String>(); for(My_Custom_Object__c s : [SELECT Legacy_Field__c , Account__c FROM My_Custom_Object__c WHERE Account__c IN (Select AccountId FROM AccountShare where ( UserOrGroupId IN : map_group OR UserOrGroupId =:UserInfo.getUserId()) AND RowCause IN ('Territory', 'TerritoryManual', 'TerritoryRule')) ]) { tempList.add(s.Legacy_Field__c); } system.debug('-----tempList-------'+tempList); system.debug('-----tempList-------'+tempList.size()); List<orders__c> orders =[SELECT id, Name, Orders__c, Bill_to__c, Payer__c, Ship_To__c, Sold_to__c FROM orders__c WHERE Bill_to__c IN: tempList OR Payer__c IN: tempList OR Ship_To__c IN: tempList OR Sold_to__c IN: tempList]; system.debug('-----orders-------'+orders); return orders; }
How to Optimize below Query
List<orders__c> orders =[SELECT id, Name, Orders__c, Bill_to__c, Payer__c, Ship_To__c, Sold_to__c FROM orders__c WHERE Bill_to__c IN: tempList OR Payer__c IN: tempList OR Ship_To__c IN: tempList OR Sold_to__c IN: tempList]; system.debug('-----orders-------'+orders);
Thank you in Advance
- Sai Ram A
- July 10, 2015
- Like
- 0
- Continue reading or reply
DataTables Table jQuery
I was going through the site http://www.datatables.net/.There is an example which is shown in the site.
When this particular example is seen in TAB or mobile the columns are sorted out like below -
Can anyone help me out how this can be achieved in visualforce page.
- ❤Code
- April 08, 2015
- Like
- 1
- Continue reading or reply
How to Remove --None-- from Picklist values which is on VisualForce Page?
Removing --None-- from the Picklist Values.
- Srini Nandhi
- March 30, 2015
- Like
- 0
- Continue reading or reply
rendering of vf page as pdf is showing an error message failed to load the pdf
hi i am getting the attached error while rendering the page.
I checked in the debug logs i can see the content in the blob string but it is not getting rendered also the pdf is getting attached with the document object to and the mime type is also shown as application/pdf still i am facing the above error.
Please help
Thanks
- SNEHA SALUNKHE
- March 30, 2015
- Like
- 0
- Continue reading or reply
setter and getter methods
i am new to salesforce, i want to know the set and get method ...
what would happen when we declare the variables like this..
please kindly help me.. please.........
public Cat3__c cat {get;set;}
public String message {get;set;}
- Anjaneylu
- March 30, 2015
- Like
- 0
- Continue reading or reply
Why threre are no log entries in developer console?
This is what i did:
Debug-> Open Exceture Anonymous Window.
System.debug('Hello');
Unchecked "open log". Execute
Alas, i couldnt see any log entries, while the workbook says that log entries will appear.
Do i need to make changes somewhere? or
Am i doing it wrong way?
- riz wan
- March 13, 2015
- Like
- 1
- Continue reading or reply
- Chidanand Magadum 24
- March 11, 2015
- Like
- 0
- Continue reading or reply
Master-detail relationship between Product2 and a junction object
Is there any way to create a master-detail relationship between Product2 and Junction Object.
- Chidanand Magadum 24
- March 10, 2015
- Like
- 0
- Continue reading or reply
- vijay bhaskar
- March 10, 2015
- Like
- 0
- Continue reading or reply
Onclick of a custom link, Open the file
On click of a custom link, i wanna open the new link. How can v achieve this? Any code help.
- Chidanand Magadum 24
- March 10, 2015
- Like
- 0
- Continue reading or reply
Setting up indirect relationship between standard and external object
I'm following a well written tutorial written by @andymahood__c: http://www.tquila.com/blog/2014/11/17/setting-lightning-connect-and-your-first-external-object
When I get to the step #3 ... "Select Edit on the CustomerID field, ...", I don't see Account (or any objects to relate) listed in the drop down box. I have created the custom field on ACCOUNT named CusotmerID Text(5) and marked it as External ID as follows:
CustomerID CustomerID__c Text(5) (External ID) [Checked]
Any ideas?
- Sumit Sarkar 2
- February 15, 2015
- Like
- 2
- Continue reading or reply
How to query more than 100 records when using <apex:remoteObjectModel>
I am currently trying to implement Remote Objects in Javascript to retrieve Accounts but having difficulty finding a workaround to query for more than the maximum limit of 100 records. Salesforce states that the maximum limit to return one batch of results is 100 but there is more than 2000 records that I need to query.
Would I have to use offsets and batch query 100 records at a time?
Here is some sample code that I was working with:
j$(document).ready(function() { var acctTable = j$('[id$="accounttable"]').DataTable({ "ajax": function(data, callback, settings) { var acct = new SObjectModel.Account(); acct.retrieve({ orderby: [{ Name: 'ASC' }], limit: 1000 }, function(err, records) { if (err) alert(err.message); else { callback({ 'data': records }); }; }); },
Any advice would be appreciated!
Thanks.
- chyun87
- January 09, 2015
- Like
- 0
- Continue reading or reply
Creating an Editable Grid/Table using visual force
The usage is as follows:
For example, if an account has 10 contacts, instead of editing one at a time. I want to be able to display a table of with just First Name, Last Name, phone, e-mail, Title
The dataTable object - is there any option to create an editable grid?
- GoForceGo
- February 29, 2008
- Like
- 0
- Continue reading or reply
DataTables Table jQuery
I was going through the site http://www.datatables.net/.There is an example which is shown in the site.
When this particular example is seen in TAB or mobile the columns are sorted out like below -
Can anyone help me out how this can be achieved in visualforce page.
- ❤Code
- April 08, 2015
- Like
- 1
- Continue reading or reply
Setting up indirect relationship between standard and external object
I'm following a well written tutorial written by @andymahood__c: http://www.tquila.com/blog/2014/11/17/setting-lightning-connect-and-your-first-external-object
When I get to the step #3 ... "Select Edit on the CustomerID field, ...", I don't see Account (or any objects to relate) listed in the drop down box. I have created the custom field on ACCOUNT named CusotmerID Text(5) and marked it as External ID as follows:
CustomerID CustomerID__c Text(5) (External ID) [Checked]
Any ideas?
- Sumit Sarkar 2
- February 15, 2015
- Like
- 2
- Continue reading or reply
How to retrieve sandbox name using apex code?
- Davi D11801
- December 18, 2014
- Like
- 2
- Continue reading or reply
BEST PRACTICE
When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.
That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it.
- Steve :-/
- February 10, 2010
- Like
- 131
- Continue reading or reply