• Jayson Faderanga 14
  • NEWBIE
  • 260 Points
  • Member since 2015

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 65
    Replies
hi,,i want to append picklist value to the name field of custom object....like custom obj name "abcdef" and picklist value is '10' and i want  to show it like as below using workflow rule
'abcdef 10'.....how it can be done??????

I have market data that is reported by MSA. Each record in the MSA contains a field with the estimate gross commission available in the account named in the record. I would like to create a report that averages the top five accounts based on gross commission volume and then compares that average to an account that the user selects.

I can see how to do with a series of SQL statements but cant see how to do it with a custom report.

Any thoughts?

Pls help in answering this q... thanks in advance.
Q) How does Salesforce enforce data access using role hierarchy?
a. Users are given access to the records owned by the users who are below them in the role hierarchy
b. Users are given access to the records owned by the users who share the same role in the role hierarchy
c. Users are given access to the records accessible by the users who are below them in the role hierarchy
d. Users are given access to the records accessible by the users who are above the role hierarchy
  • September 14, 2015
  • Like
  • 0
Can you pls help me in aswering...
Q) In a data model object A is related to object B, object B is related to object C. How will a you create a report to include fields of object A as well as object C?
a. Create a custom report type with A, B and C, and use it in the report
b. Report cannot be created
c. Create a custom report with A and C fields as relationships already exist
d. Create lookup relationships between A,B and C
  • September 09, 2015
  • Like
  • 0
I am looking to reformat a formula field I've created for a custom object. This formula field, disambiguates between the account object and contact object, as we are on the one-to-one relationship model in Salesforce, in which a contact that is an individual is both contact/account and a contact representing a company is a group.

Currently my formula for the field is configured this way, I've created a concatenated formula in contact object which takes the first and last name and merges it into one. For instance First Name: Joe Last Name: Smith = Joe Smith

For the custom Object I've designed this formula in the field

IF(Account__r.Name = Contact__r.FullName__c , NULL,"Attn: " & Contact__r.FirstName & Contact__r.FullName__c)

However, at times, when I only input the last name and leave the first name field blank, in the instance that the contact does not have the first name, the Attention to formula returns a value when it should be blank.

Are there any customizations, I can make to my formula to make it so that even without the first name filled, it only returns when the account name and contact name do not match. IE Account Name SampleCO, Contact Joe Smith

Account                               Contact                                     Attention to

User-added image
Can I restrict account access to a particular user? For e.g. I have users U1, U2, U3...... and accounts A1, A2, A3......
Can below scenario exists?

1. U1 can access accounts A1 & A2.
2. U2 can access only A1.
3. U3 can access A1, A2 & A2.

I don't want to create a groups as in sharing settings to allow access based on criteria. I want to restict access to accounts based on user and not group.
I want something like adding users to account team and only those users who exist in the account team can access a particular account.

Thanks 
  • July 27, 2015
  • Like
  • 0
Hi,
  The Situation is I do have two check boxes A & B. My condition is to allow any one of the check box to be true at a time. If A is true B should be false and Vice versa. I am new to Salesforce and don't know how to use the Functions.

Thank you.
 
Hello,

I wrote a trigger that automatically adds an event invitees(User). It works fine on my enterprise edition trial Org so I created it on our Sandbox, I got the same code but it is not working on sandbox, I tried deploying it in production thinking that maybe because the user email address in sandbox is different but it is not also working in production.

on my debug, it shows it is working fine, I'm getting the invitees but it is not showing on the event. below is my code, I have custom settings on this.

User-added image

Thanks!

Hello,
 

Partner community users doesn't have the ability to reply on case emails, is there a way to use a link or a custom button to do this????

guys I'm sorry for consecutive post of questions.
I'm new in Apex, this is the first language I'm trying to learn, bear with me please :D I'll treat beer and ice cream (whoa great combination!) if you get this. :D

I'm trying to create a trigger that worked like a rollup summary field, I wanted to calculate the summation of "total revenue" (custom field on a custom object)  of all the related records to show on the Account(master) (lookup relationship). but before that I wanted to count first how many related records are there. I have a custom field name revenue on the Account. I want to place here the count of related record. Here are the code I have but it doesn't populate the field. The code only counts the related record, I'll create a new code to calculate the total revenue.

trigger projRev on Project__c (after insert, after update, after delete, after undelete) {
                          
List<Project__c> newProject = new List<Project__c>();
Set<Id> AccId = new Set<Id>();                                      
                                      
for (Project__c newProj : trigger.new) {
    if(newProj.Account__r != null) {
        AccId.add(newProj.Account__r.Id);
        newProject.add(newProj);
        }      
    }                  

List<Project__c> exProj = [Select Id from Project__c where Project__c.Account__r.Id IN :AccId];
integer treat = exProj.size();

    for (Project__c newProjs : newProject) {
    newProjs.Account__r.Revenue__c = treat;
       
       
}




}
I am getting an error when I tried to insert more than 200 account records using data loader. I created the below trigger code and the error message is shown below. any idea guys?

oppCreate: execution of AfterInsert

caused by: System.DmlException: Insert failed. First exception on row 0 with id 00628000002gPTkAAM; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id]

Trigger.oppCreate: line 19, column 1



trigger oppCreate on Account (after insert) {

List<Opportunity> newlyCreatedOpp =  new List<Opportunity>();

for (Account newAcc : Trigger.new)
{

Opportunity createOpp = new Opportunity ();
    createOpp.Name = newAcc.name + 'Opportunity';
    createOpp.CloseDate = system.today().addDays(30);
    createOpp.AccountId = newAcc.Id;
    if (newAcc.numberofEmployees> 100) {
    createOpp.StageName = 'Prospecting'; } 
    else if(newAcc.numberofEmployees< 100) {
    createOpp.StageName = 'Qualification'; }
    else {}
    
newlyCreatedOpp.add(createOpp);

    }
      
insert newlyCreatedOpp;


}

trigger duplicateContacsonAccount on Contact (before insert, before update) {


for (Contact newCon : Trigger.New) {

if (newCon.email != null)

 {
 
 List <Contact> exCon = [Select email from Contact where AccountId = :newCon.AccountId AND Email = :newCon.email Limit 1];
 
if (exCon.size() > 0)

  {
         newCon.addError('Duplicate Contact Found');
  
  
  }

 }
 

}
Hi Guys, I'm trying to create SOQL to list all Contact Records with the same Account Id..any idea? thanks!
Hello,

I wrote a trigger that automatically adds an event invitees(User). It works fine on my enterprise edition trial Org so I created it on our Sandbox, I got the same code but it is not working on sandbox, I tried deploying it in production thinking that maybe because the user email address in sandbox is different but it is not also working in production.

on my debug, it shows it is working fine, I'm getting the invitees but it is not showing on the event. below is my code, I have custom settings on this.

User-added image

Thanks!
TrailHead - Automating Processes with the Lightning Process Builder - error

Hope that someone can help me here. I wanted to finish my challenge of this traihead.

Created the proces with the following conditions:
User-added image

With the following actions:
User-added image
And got the following eror when I checked the challenge:
User-added image
 What did I do wrong?
hi,,i want to append picklist value to the name field of custom object....like custom obj name "abcdef" and picklist value is '10' and i want  to show it like as below using workflow rule
'abcdef 10'.....how it can be done??????
I am having a small issue populating 2 fields in my custom button, everything else seems to work fine but the account field does not populate anything and I cannot populate a user in the account contact field.  comments by the problem areas. code:
 
/setup/ui/recordtypeselect.jsp?ent=01I3B0000008YRp&
retURL=%2F{!Opportunity.Id}&
save_new_url=%2Fa2C%2Fe%3F{!Opportunity.Name}
accid={!Opportunity.Id}&
CF00N3B000000OKFI={!Opportunity.Primary_Contact__c}&
CF00N3B000000OKFI_lkid={!Opportunity.Primary_Contact__c.UserId}&//not sure how to reference the user id here?
CF00N3B000000OKFz={!Opportunity.Name}&
CF00N3B000000OKFz_lkid={!Opportunity.Id}&
CF00N3B000000OKFB ={!Opportunity.Account}&//this field is left blank, but these references work in any other field i assign them to
CF00N3B000000OKFB_lkid={!Opportunity.AccountId}&
00N3B000000OKFR={!Today()+90}&
Name=Quote For {!Opportunity.Name}

and in fact i would rather have the primary user in the related list Contact Roles as the Account contact.  Any help is greatly appreciated!
  • November 01, 2015
  • Like
  • 0
Hello
I have to share records with users of a different profile.

In OWD, for that object  OWD=public read only
                                       ​
so even if I don't have VIEW ALL OR  VIEW ALL data permissions in profile  ​, can I still share records?

Please clarify .​

I have market data that is reported by MSA. Each record in the MSA contains a field with the estimate gross commission available in the account named in the record. I would like to create a report that averages the top five accounts based on gross commission volume and then compares that average to an account that the user selects.

I can see how to do with a series of SQL statements but cant see how to do it with a custom report.

Any thoughts?

Is there a way I can automate setup audit trail download?

Thanks in advance for your help !
I would like to use Flow to create a record in a wizard-style, leading the user through individual questions with Screens ; and then the Record Type of the new record would be determined based upon the user's answers to the questions. I have customized the New button to be aimed to a VF page which is nothing but a reference to the Flow. However, when the New button is pressed it will prompt me with the Record Type choice before the Flow's Screens begin. 

Does anybody know of a way to get the Screens to come up before the user is prompted with a Record Type ? Is there a setting to 
  • October 13, 2015
  • Like
  • 0

I have below trigger to throw the error when the test__c value is null (I understand that I can use a validation rule but I don't want to use it).

It is not firing. can someone let me know the reason.


trigger CandidateCityRequired on Account (before insert) {

list acc = [select id,test__c from Account WHERE Id IN:Trigger.new];

for (Account Candidate : acc) {
if (Candidate.test__c == null) 
Candidate.addError('City cannot be NULL');
}
}



Since the trigger is not firing, more specifically is there any logic error on the trigger.new SOQL statement. ?? 
I want to bulkify a trigger and its very urgent. 

Please help me by correcting my code.
This may have already been tackled via an administrative schema, but here is what I need to achieve:

1.  Profile 'A' should only be able to see records of 'Record Type A'

2.  Profile 'B' should only be able to see records of 'Record Type B'

I called support about this and they said it was impossible to do without an APEX trigger, and recommended that I submit a request to Development.  Any thoughts?
I have done this a million times it seems like... but I do not understand why this is not working.

There is an External ID (Called "HALO ID") on the contact object.
A technician fills out a web-to-lead form online, puts in their Halo ID and Salesforce should Relate the Contact to the Lead.

I troubleshooted the process builder that autolaunches the flow just fine.
Trigger:  Halo ID NOT null && Technician = null
sObject: "Lead" (Lead sobject)

User-added image

User-added image

User-added image

User-added image

User-added image

Please help, thank you!
I have a requirement to copy all metadata + data to a new Production instance. What is the best way to do this ?
The new org should be exactly the same as the first one and we will continue to use both orgs in parallel. (different users in each org)
Hi everyone,
I have a tricky situation. I am able to add  contacts as event invitees through apex code but an email is not being sent . On the Event record, the contact names are being populated in the " Has'nt Responded " section of the related list. Only if the contact accepts the invitation, his name would come up in the " Accepted " section of the related list . Untill and unless contact gets an email, he/she cannot accept the invitation.

Any help is appreciated. Thanks in advance.
Hi - I have a custom object, 'Jobs', and when the job status is set to 'scheduled' I have a Process Flow to create the 'Install Event'.  I can map over the job - event fields with no issue, however I have 'Lead Engineer' as a look up contact field on the job and would like to auto add this contact as an invitee to the event.  There is an option in the process builder to set the contact as 'IsInvitee = TRUE' but that does not seem to do anything - I assume because there doesn't seem to be a way of identifying the specific event.  

I am hoping to have a solution to this without coding as I am not a coder and we are on a very limited budget.  any help here would be much appreciated.  Thank you for taking the time to read!