• Amitabhleo
  • NEWBIE
  • 10 Points
  • Member since 2006
  • SFDC Consultant
  • SaaSfocus Consulting Pvt Ltd.


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 21
    Replies
Hi,
I used to have a small trick of deduping records. (This is not salesforce.com duplicate management as you cannot used it with two lookups)
  • create a Text  unique field 
  • Update the unique field using workflow by concatenating the ID's of 2 look up fields.
  • Hide this field on the page layout
  • This would give an error if I used a same relationship twice.
  • This worked fine using workflow.
  • When I created a same workflow using Process builder I could not get the below dupe error.
  • I would like to understand the difference between field updates of workflows and process builder
  • one thing i checked is that process builder returned 15 digit Id while workflow returned 18 digit id.
thanks in advance.
Amitabh
dupe check error

The Same error using Process Builder comes on my Email as:

UPDATE --- UPDATE FAILED --- ERRORS : (DUPLICATE_VALUE) duplicate value found: PriceBook_Entry_Unique__c duplicates value on record with id: a0728000001mXRM, 
 
Hi,

I am not able to create a simple duplicate rule to check if the email, First Name, Last Name on Account (Person Account) is the same.

The system is not letting me select  the Person account fields (contacts).

Thanks in Advance.
Hi Anybody, who took the TrailHead. Visual Workflow challange, I am not able to change the close date of the Opportunity by adding 30 days to it.

{!$Flow.CurrentDate} + 30 does not let me save.

thanks in Advance
Amitabh

Hello,

 

I am trying to create a  trigger for understanding Maps as my real life situation has similar Object relationships.

 

I want all the Opportunity Names to be Populated as a New Contact  on insert or update.

 

My Problem is I have been able to successfuly query the Opportunity Name and create a new Contact. I am not able to iterate thru the Opporunity Object Map or when there are multiple Opportunities only one contact gets created.

 

I am enclosing the code and I hope this can run on any instance as I am using standard objects.

 

Thanks in advance.

trigger accountContactFromOpp1 on Account (before insert, before update) {
	//trigger accountContactFromOpp on Account (before update, before insert) {
/*
	This is a MAP test the objective is to query all Opportunities for an account which 
	has Billing city as Null (just a test)	New Contact for each Opportunity Name
*/
	//passing on all Account Id into a set
	Set<ID> AcctId = new Set<ID>();
	
	//loop thru the trigger set and build a set of all the Accounts with no contacts.
	
	for(Account acct : Trigger.new){
		if (acct.BillingCity == NULL){
			AcctId.add(acct.Id);
		}
	
	}
	//for query thos Accouts Id and create a map connecting them 	
		Map<ID,Opportunity> myOppMap = new Map<ID,Opportunity>();
	
	for(Opportunity thisOpp : [Select Id, Name, AccountId From Opportunity where AccountId IN : AcctId]){
		myOppMap.put(thisOpp.AccountId,thisOpp);
	}
	//looping thru the Trigger again ok
	for(Account acct : Trigger.new){
		if(acct.BillingCity == NULL){
			acct.Description = myOppMap.get(acct.Id).Name;
						
				Contact cont = new Contact(LastName = myOppMap.get(acct.Id).Name,AccountId = acct.Id);
				insert cont;
				
		}
	
	}//end loop acct Trigger.new
}

 

 

Hi,

 

I have been using HTML email Status reports to view the how many of my emails got read.

 

So far so good. :smileyhappy:

 

If I want to resend the emails to all contacts in which the HTML email status was unread.

 

I have no clue how to filter these.:smileymad:

 

 

  • I tried to create a new tickfield in contacts.
  • I was unable to update this as the HTML report is not giving me the contact ID field.
  • I tried both with the Data loader and the Native tool.

 

Thanks in Advance for any help.

 
 

 

Hi ,

 

I am trying to update a contact field from the parent account formula field which returns a percent.

 

Below is my code

public with sharing class HelloUpdateAccount { public static void updateAcc(Account[]accs){ // Create a list of account records from a SOQL query List<Account> accs1 = [SELECT Id,BillingCity, Name FROM Account WHERE Name = 'Acme' limit 1]; // Loop through the list and update the Name field for(Account a : accs1){ //Retrieve the contact Contact cont = new Contact(); cont = [select Name,Id from Contact where AccountId =:a.id]; cont.MailingCity = a.BillingCity; //check_tax_update__c is a test formula field which returns a percent below is the code //IF( SLAExpirationDate__c >today(), 50, 90) cont.SLA_check__c=46; //a.check_tax_update__c; update cont; } } }

 

Thanks in advance.

 

 

Hi all,

I am facing a problem. I have 9 product managers who look after specific product families.

I want to limit each product manager to view and edit only his Product family.

Thanks in advance.
Code:
result = sforce.connection.query("Select Name, Id, BillingStreet, BillingCity, 
(Select Opportunity.Id,AccountId, Name, Amount, Opportunity_Assigned_To__c, Gross_Contribution_del__c
From Opportunities where Opportunity.Id = '{!Opportunity.Id}' )
From Account where Account.Id = '{!Opportunity.AccountId}'"); records = result.getArray("records"); for (var i=0; i< records.length; i++) { var record = records[i]; alert("records in array are : "+ records[i])

 I am able to view both the parent and the child query result but I am unable to update the child records, Opportunity Items in this case.

I need to create a nested for but i am unabe to put a condition for the Object type i.e Opportunity.

Thanks in advance,


Message Edited by Amitabhleo on 03-29-2008 07:25 AM
Dear All,

I have been using the filter by creteria with all assets look up.

I would like this filter by fields to be added to all my look ups.

Please advice.

Thanks in advance,

regards,


Hi all,

I have created a number of custom fields in Opportunity which needs to be filled only after the Opportunity stage is closed won.

I would like them to be blanked like we have in Opportunity Lost reason i.e a pick field dependent on Opportunity closed lost.

Thanks in advance.

regards,
Hi,

I have a problem I have created a  scontrols, which I am running through custom button link.

The button is visible to all the users in my organisation, but when they run the scontrol in the existing window with side bar.

The window and side bar appears and the rest of the screen just blanks out.

I have checked all the field level permissions they are perfectly all right.

Please help me out.

Thanks in advance.

Regards
Amitabh

Message Edited by Amitabhleo on 10-08-2007 04:21 AM

Hi All,

    I am a salesforce consultant with SFDC administrative exposure of 5 years, currently working as an SFDC administrator in a technology company based in India, supporting US Operations.

 

I have expertise in salesforceimplementation, integration,  customization and designing workflows. Out of the box thinking is my forte.

I do freelancing during evenings and weekends.

Also available to work part-time, full-time, on-site, off-site, per-project or on a time & materials basis.


Thanks & Best Regards,


Message Edited by Amitabhleo on 09-24-2007 11:29 PM

Message Edited by Amitabhleo on 07-16-2009 11:41 PM

Can anybody please help me out , I would like to display account id in the account details page.

I tried creating a formula 'Account Code' field and coped Id in it.

The formula field 'Account Code' in which I copied the Id is not showing the last three Characters (Truncating) of the ID hence I am not able to search for the Account using this field.

I tried to increase the length of the 'Account Code' formula field, I was not able to do it..

Please Help.

regards,

Amitabh

Hi everybody,
 
I would like to display Account Id generated by SFDC on the Account Details page.
 
pls advice,
 
Regards,
 
amitabh, India
Hi Anybody, who took the TrailHead. Visual Workflow challange, I am not able to change the close date of the Opportunity by adding 30 days to it.

{!$Flow.CurrentDate} + 30 does not let me save.

thanks in Advance
Amitabh
Hi,

I am not able to create a simple duplicate rule to check if the email, First Name, Last Name on Account (Person Account) is the same.

The system is not letting me select  the Person account fields (contacts).

Thanks in Advance.
Through apex call out i am getting following response from .Net Webservice  . How I will render/create as attachment  in salesforce as well formed PDF file based on below response.

JVBERi0xLjQNCiVET0MxIFJlc291cmNlR1VJRD01ODU4REFCNUQzQUY0RjY2QjU2Mzc5Mzg5NjI0NDYxMg0KJeLj5A0KMSAwIG9iag0KPDwgL1R5cGUgL1BhZ2UNCi9QYXJlbnQgMyAwIFINCi9SZXNvdXJjZXMgNCAw........

Please help . 

Hi

    we have a  requirement of

 How to restrict  Pricebook selection based on  opportunity  picklist of country.

 

Decp:When we  Select a picklist value as India in opportunity, we have to access india price book only.

 

How to achieve this requirment ? 

 

Thanks in Advance 

  • February 20, 2013
  • Like
  • 0

Hello,

 

I am trying to create a  trigger for understanding Maps as my real life situation has similar Object relationships.

 

I want all the Opportunity Names to be Populated as a New Contact  on insert or update.

 

My Problem is I have been able to successfuly query the Opportunity Name and create a new Contact. I am not able to iterate thru the Opporunity Object Map or when there are multiple Opportunities only one contact gets created.

 

I am enclosing the code and I hope this can run on any instance as I am using standard objects.

 

Thanks in advance.

trigger accountContactFromOpp1 on Account (before insert, before update) {
	//trigger accountContactFromOpp on Account (before update, before insert) {
/*
	This is a MAP test the objective is to query all Opportunities for an account which 
	has Billing city as Null (just a test)	New Contact for each Opportunity Name
*/
	//passing on all Account Id into a set
	Set<ID> AcctId = new Set<ID>();
	
	//loop thru the trigger set and build a set of all the Accounts with no contacts.
	
	for(Account acct : Trigger.new){
		if (acct.BillingCity == NULL){
			AcctId.add(acct.Id);
		}
	
	}
	//for query thos Accouts Id and create a map connecting them 	
		Map<ID,Opportunity> myOppMap = new Map<ID,Opportunity>();
	
	for(Opportunity thisOpp : [Select Id, Name, AccountId From Opportunity where AccountId IN : AcctId]){
		myOppMap.put(thisOpp.AccountId,thisOpp);
	}
	//looping thru the Trigger again ok
	for(Account acct : Trigger.new){
		if(acct.BillingCity == NULL){
			acct.Description = myOppMap.get(acct.Id).Name;
						
				Contact cont = new Contact(LastName = myOppMap.get(acct.Id).Name,AccountId = acct.Id);
				insert cont;
				
		}
	
	}//end loop acct Trigger.new
}

 

 

Hi, 

 

We would like to add an Account column to HTML Email Status Reports. Anyone know how to do this?

 

Presently these mass email reports only contain the contact names of those we emailed. It doesn't include the accounts for which those contacts belong. Should be a simple function but doesn't look available.

 

 

Thanks in advance for any suggestions. 

 

Hi ,

 

I am trying to update a contact field from the parent account formula field which returns a percent.

 

Below is my code

public with sharing class HelloUpdateAccount { public static void updateAcc(Account[]accs){ // Create a list of account records from a SOQL query List<Account> accs1 = [SELECT Id,BillingCity, Name FROM Account WHERE Name = 'Acme' limit 1]; // Loop through the list and update the Name field for(Account a : accs1){ //Retrieve the contact Contact cont = new Contact(); cont = [select Name,Id from Contact where AccountId =:a.id]; cont.MailingCity = a.BillingCity; //check_tax_update__c is a test formula field which returns a percent below is the code //IF( SLAExpirationDate__c >today(), 50, 90) cont.SLA_check__c=46; //a.check_tax_update__c; update cont; } } }

 

Thanks in advance.

 

 

Hey all,
The part of the project that I am working on has basically three levels of custom objects. The design looks something like this:
 
Top Level object
   |
 / | \
Middle Level Object
    |
  / | \
Lower Level Object
 
the lowest level has a number field (hours) that will be input from user. The field in middle level needs to be a sum of all hours in the lower level. Likewise, the Top level will need a sum of all the middle level hours.
 
I am looking at roll up summariesas a way to acomplish this, but i can not have the top level be the master detail for the middle and also have the middle be a master detail of lower level.
 
Is there some way to accomplish this?
Thanks in advance
Hi guys i am using javascript to reassign an approval to someone else but i am having problems getting the workitemitds i am confused on what methods i can call on these two objects in javascript


var rDate = new Date();
                rDate.setDate(rDate.getDate() + 2);       
                CreateTask("00520000000tKm3", "IS IN SALES - SENIOR MANAGER", "SUP SUP", rDate, "High");
                UpdateCaseStage("Senior Manager");
               
                var request = new sforce.ProcessSubmitRequest();
                request.objectId = "{!Case.Id}";
                request.comments = "Test Process Submit Request";
                var processRequest = sforce.connection.process([request]);
                //alert(processRequest);
           
                var record = new Array();
                record[0] = processRequest[0];
                alert(record[0].success);
               
                /*var workItem = new sforce.ProcessWorkitemRequest();
                workItem.action = "Approve";
                workItem.workitemId = "04aT00000008POi";
                workItem.nextApproverIds = "00520000000sbtx";
                workItem.comments = "Assigned to Senior Manager";
                var processWorkItem = sforce.connection.process([workItem]);
                alert(processWorkItem);*/


What i am trying to do is get the workItemId from processRequest object but having no go help pls?
Hi,

I have a problem I have created a  scontrols, which I am running through custom button link.

The button is visible to all the users in my organisation, but when they run the scontrol in the existing window with side bar.

The window and side bar appears and the rest of the screen just blanks out.

I have checked all the field level permissions they are perfectly all right.

Please help me out.

Thanks in advance.

Regards
Amitabh

Message Edited by Amitabhleo on 10-08-2007 04:21 AM

I work for an established SFDC consulting and subcontracting partner in NZ. I am growing my SFDC/SaaS team and am looking for another good consultant to join the team.

See the company website at:
http://www.fronde.com/Synergy/
and click on the Jobs link from the menu bar at the top.

The direct link to the job advert on the job site is:
http://www.bfound.net/detail.aspx?jobId=47649&CoId=201&rq=2

The role will be based in Auckland and it is a permenant position.

Alternatively you can use the contact us form at:
http://www.fronde.com/Contact.aspx
and in the comments ask for your details to be sent on the the Auckland SFDC/SaaS team.

Richard

Can anybody please help me out , I would like to display account id in the account details page.

I tried creating a formula 'Account Code' field and coped Id in it.

The formula field 'Account Code' in which I copied the Id is not showing the last three Characters (Truncating) of the ID hence I am not able to search for the Account using this field.

I tried to increase the length of the 'Account Code' formula field, I was not able to do it..

Please Help.

regards,

Amitabh

Hi everybody,
 
I would like to display Account Id generated by SFDC on the Account Details page.
 
pls advice,
 
Regards,
 
amitabh, India
Hi,
 
I am trying to install the Apex Toolkit for eclipse.
I've been following the guidelines from:
I keep getting stuck at step 9:
9. In the following dialog, select the Apex Toolkit and then click “Select Required”
Here i am presented with the following error:
Apex Eclipse Toolkit (8.0.2002) requires plug-in "org.apache.axis"
I am working on Windows Vista Home Premium.
I am running Eclipse Version 3.2.2
I have installed the latest version of Java "Windows Platform - Java(TM) SE Development Kit 6 Update 1" from http://java.sun.com/javase/downloads/index.jsp
Hi!
 
I'm developing scontrols in Java Script. It is quite simple to jump at the end to a newly created object,
e.g.
window.parent.parent.location.href = myNewObjectId;
 
but how can I jump directly to the Object in edit mode? (so that the user can go on editing this object) 
Is this possible? How?
 
Thanks
 Diane