• Kunal01
  • NEWBIE
  • 104 Points
  • Member since 2011

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 29
    Replies
I am trtying to create a workflow that updates a date field when the prior value is a Queue ID (Owner ID) and is changed. 

i have been able to do it when there is a picklist value like this

ISPICKVAL(PRIORVALUE(  Queue__c ), "QC Review")&& ischanged ( Queue__c )

How do I write the below referencing a lookup owner filed rather then a picklist field

PRIORVALUE(ownerid =  "00G37000000heZl") && ischanged ( ownerid)

Thanks in advanced

Sean
 

Might be missing something...I'm not able to change the tab name of one of my custom object.. I tried deleting and recreating new tab for that object. but on doing so, it is automatically taking the old tab name and not letting me select new tab Name anywhere. Let me know from where I can do so.

Hi,

 

How to get the field id's for standard objects. I need to access the field ids for contact object.

 

Thanks

How to deploy the aplication from Eclipse to force.com?please tell me the steps...

  • November 17, 2011
  • Like
  • 0

Hi

 

How to show the items pending for approval in console view mode.

 

Whe I dont use Console view it comes in my home page. but how to show in the console view ??

 

Thanks,

Kunal.

Hi

 

How to show the items pending for approval in console view mode.

 

Whe I dont use Console view it comes in my home page. but how to show in the console view ??

 

Thanks,

Kunal.

Hi,


I am facing one issue with creation of Business hour test data in one of my test method. while inserting businesshour test record it is giving an exception "Save error: DML not allowed on BusinessHours".

If I can't create BusinesssHour record in test method than how do i refer to the busnesshours record for the test coverage.

Thanks,
Kunal.

How to make my custom field searchable in salesforce?????

 

 

 I am stuk with it. Please help me out.

 

Thanks,

kunal.

Hi All,

 

I am new to apex Web service development. So pleases help me out in understanding best practices for the apex web service development. And what are thing which we should keep in mind while writting the services.

 

Thanks,

Kunal.

Hi,

I'm looking for help with setting up a trigger to calculate the number of days from a start date to an end date...
I'm new to this stuff so any help would be appreciated.

Thanks,

Mitchell
Hi,
PLease help.
I have a custom object and a trigger, I see its working in sandbox , with test case coverage of 100% i migrated to production. This trigger is not working.
is there anything to do special for custom triggers?
 when a field is updated , oan custom object record is created with a trigger, after record is created I want opportunity object to be updated back.

Here is the code
trigger UpdateRefExist on Customer_Ref_Design__c (after insert) {
List <Opportunity> oppupdate = new List <Opportunity>();
    for (Customer_Ref_Design__c ref : Trigger.new){
        Opportunity opp = [select Id,RefDesignExist__c from Opportunity where Id = :ref.Oppid__c]; 
        opp.RefDesignExist__c='Y';  
           oppupdate.add(opp);
        }
     try {
         update oppupdate;
         } catch (system.Dmlexception e) {
             system.debug (e);
         }
}

Thanks
Pallavi
I am trtying to create a workflow that updates a date field when the prior value is a Queue ID (Owner ID) and is changed. 

i have been able to do it when there is a picklist value like this

ISPICKVAL(PRIORVALUE(  Queue__c ), "QC Review")&& ischanged ( Queue__c )

How do I write the below referencing a lookup owner filed rather then a picklist field

PRIORVALUE(ownerid =  "00G37000000heZl") && ischanged ( ownerid)

Thanks in advanced

Sean
 

Hi,

 

I am doing some web service based project and there are two salesforce instance, one is client instance (can be many) and other one is the server instance. On both instance there is similar custom object

 

I want that if a record of custom object is inserted on server instance then it should also be inserted on the client side immediately.

 

One possible solution might be a batch running on the client side, to read the new records (through web service) from the server instance and then insert into client instance but this will not insert data immediately. The batch could be scheduled to run every few hours.

 

Thanks,

Soni

hey,

 

    I am trying to delete contacts (Child records) of an Account, but only when i remove the LastName(Mandatory field) of a contact record.

Actually  i have visualforce page where LastName field of Contact is an input field, if user wants to update he can change the LastName and the record will be Updated...this thing is happening in my code

     BUT trying to delete the records by removing the LastName and leaving it BLANK...Thats not happening.

 

Regards 

Abhi Tripathi

how to query records let us say  from 6 to 10 like that...
 
 
 

Hello,

 

i'm getting the error - 'You have uncommitted work pending. Please commit or rollback before calling out'  when performing  updates for multiple object or calling multiple update statements.

 

i have two sObjects 1) Contact and 2) Account as below -

 

sContact = [SELECT c.FirstName, c.LastName, c.Title FROM Contact c WHERE c.Id = :contactId];
sAccount = [SELECT a.Id, a.Name,a.Website FROM Account a WHERE a.Id = :accountId];

 

after this inside a loop i'm updating some filed values of both objects as -

 

   for(Integer i=0 ; i<selRecords.size() ; i++)
     {
              if(selRecords[i].AttributeType == 'contact')
                    {
                        sContact.put(selRecords[i].FieldName,selRecords[i].fieldValue);
                    }
                    if(selRecords[i].AttributeType == 'CompanyType')
                    {
                        sAccount.put(selRecords[i].FieldName,selRecords[i].fieldValue);
                    }
         }
     

               update sContact;
               update sAccount;

 

during the call "update sAccount" it throws the error - You have uncommitted work pending. Please commit or rollback before calling out.

 

i tried Database.SaveResult[] SR = database.update(updatesArr);   also, where updatesArr is array of SObject in which both of the above sObjects are assigned, but can't get it working.

 

Please suggest that how can we call multiple update statements or perform multiple sObject updates.

 

Thanks in advance.

          

Hi Guys,

I'm really stucked at my final stage of coding. I've created a custom button in lead section and i'm calling custom setting url in javascript code.
It works very well in my developer organization but it fails when I installs this in other developer organization.
Here is the code for your reference;

 

{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")}
var uname = encodeURI('{!$Setup.UserDetails__c.UName__c}'); 
var ukey= encodeURI('{!$Setup.UserDetails__c.Sha1Key__c}');
try{
var rurl= escape('/handleapprequest?email={!Lead.Email}&fname={!Lead.FirstName}&lastname={!Lead.LastName}&company={!Lead.Company}');
window.open('{!$Setup.UserDetails__c.Url__c}login/' + uname + '/'+ ukey +'?returnurl='+rurl, 'Send Email', 'height=600,location=no,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=1', 1)
}catch(err)
{alert(err);}

 

When I install my package to different developer organization, the button which executes onClick javascript, thows an exception 'A problem with the OnClick JavaScript for this button or link was encountered: Field Setup.UserDetails__c.UName__c does not exists check spelling'
Please, let me know what is going wrong here? I've already created Beta package and I can not change or remove code from my developer org.
Thanks a lot.

Hi

How can we loginto partner portal after creating the portal ?can anybody help me?

Hi ,

      how to save records into salesforce from senchtouch.

      if any body know, please help me.

 

Thanks

p.r

 

Hello.  I have a question about doing the first deployment from the sandbox to production.

 

I have been developing my app in my sandbox.  I set up the sandbox a few months ago.  I initially began my development in the production version - but then created the sandbox.  In other words, there are some fields, objects, workflows, etc in my production version...but my sandbox has modified or deleted a lot of the stuff that was in the productioin version.

 

So, my question is this.  Would it harm anything if I deleted EVERYTHING in my production version prior to updating it with the sandbox items?  I have no needed data in the production version (so a deletion will not cause any important data loss).  My thinking is that it might make things "cleaner" if I just replaced the whole production version with what is in the sandbox.

 

Thanks for any comments.  I just wanted to ask this question in case I missed any possible problems with this approach.

 

 

 

Might be missing something...I'm not able to change the tab name of one of my custom object.. I tried deleting and recreating new tab for that object. but on doing so, it is automatically taking the old tab name and not letting me select new tab Name anywhere. Let me know from where I can do so.

Hi,

   I have an object C .Its has a filed called CProducer__c .That looks upto Producer Object. Producer__c has a field called Active( Checkbox set to false by default).

   Now I wanna toggle the value of checkbox to true(for the producer record, whose name is mentioned in C  record) , If An entry is made in C__c object with a particular producers name given in field CProducer__c.

 

Please help!!!!

I have created a Custom Setting (Hierarchy Type), With 3 fields in it.

 

 

Now, how can i display these values on Visual force page.

 

i have tried this, but unable to display values on VF page.

Weekly_Invoice_Setting__c (Custom Setting Name)

Below my 3 fields

1. Nominal_Code__c

2.Sales_Invoice__c

3.TI_VAT_code__c 

 

public Weekly_Invoice_Setting__c WIS {get; set;}

 Weekly_Invoice_Setting__c WIS = [select Nominal_Code__c,Sales_Invoice__c,TI_VAT_code__c from Weekly_Invoice_Setting__c];

  • January 16, 2012
  • Like
  • 0

I have a rich text field on the opportunity that I need to populate with various peices of data on the opportunity. I have two main issues:

 

1. I am able to do this, but with only a single data type at a time. I can not seem to figure out how to combine all three lists into a single list.  Here is what I have so far.

2. My \n is not making the next line item go on to a new line down.

 

trigger OpportunityProuctCopytoHiddenField on Opportunity (before insert, before update) {
for(Opportunity t:trigger.new)
      {
        List<String> NewList= new List<String>();
        List<Decimal> NewList2= new List<Decimal>();
        List<Datetime> NewList3= new List<Datetime>();
        if (t.HasOpportunityLineItem == true)
        {
             for(OpportunityLineItem OpLine: [SELECT CreatedBy.Name, Quantity, TotalPrice, LastModifiedDate, PriceBookEntry.Name, UnitPrice, ID FROM OpportunityLineItem WHERE OpportunityId =:t.Id] )
            {
                NewList.add(OpLine.PriceBookEntry.Name);
                NewList.add(' has been authorized by ');
                NewList2.add(OpLine.Quantity);
                NewList.add(OpLine.CreatedBy.Name);
                NewList.add('and the transation has been logged into the record id: ');
                NewList.add(OpLine.ID);
                NewList.add(' on');
                NewList3.add(OpLine.LastModifiedDate);
                            }
            for(String c : NewList){
            t.Hidden_Products__c = t.Hidden_Products__c + c + '\n';
            }
        }
    }
}

 

And i am pretty sure what I am missing is somewhere around:

            for(String c : NewList){
            t.Hidden_Products__c = t.Hidden_Products__c + c + '\n';