• Forza di Sogno
  • NEWBIE
  • 85 Points
  • Member since 2013

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 5
    Questions
  • 36
    Replies
Hi.  I have multiple custom buttons on a custom object, each of which corresponds to a different contract in DocuSign - and subsequently sends a different contract based on city. This means that there are currently 40 buttons to determine which contract to send from DocuSign. Needless to say, this is ridiculous and takes forever to load.

I would like to have ONE button to submit contracts, and have that button intelligently find which contract to send based on a picklist value or a formula field.

My current code for each button looks like this:
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
{!REQUIRESCRIPT("/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/ajax/20.0/apex.js")}

if({!D__c.P__c==''}) {alert("Please make sure that Status is YES and that the Check is in PASS and that the Date is filled in");
} else {
var RC = '';var RSL='';var RSRO='';var RROS='';var CCNM='';var CRCL=''; var OCO='';var DST='';var LA='';var CEM='';var CES='';varSTB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';var CRL = 'Email~{!D__c.Email__c};FirstName~{!D__c.FirstName__c};LastName~{!D__c.LastName__c};Role~A;RoutingOrder~1';var CCRM='A~Signer1';var CCTM='A~Signer';
RC = 'GetRelContentIDs("{!D__c.Id}")';
OCO='Tag';
DST='A1234567890-B0987654321-C13579';
LA='0';
STB='1';
SSB='1';
SES='1';
SEM='1';
CES='Please DocuSign these documents';
CEM='Hi-\\n\\nWe wanted to let you know some stuff... Attached is an Agreement for you to complete...';
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!D__c.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;
}


In the code sample above:
DST='A1234567890-B0987654321-C13579';
determines what template to use...

What I would like to do, is have DST='the string value of D__c.Some_Formula_Field__c' so that I can then populate this Some_Formula_Field__c with the necessary reference to the DocuSign contract automatically, so I can just use ONE button.

Can anyone help me?

hi friends

can anyone tell me

in apex class or in soql query when we wil get "101" kind of error...

thanks

Hi,

I have a Process Builder that kicks off when a survey is submitted.  It in turn is calling a Visualflow to make updates in Salesforce based on the opportunity attached to the survey.

Without the Process Builder the survey works fine, but with the PB/VF it bombs out with an "Authorization required" error.  I believe this is because of the guest site user doesn't have the "Run Visualflows" system permission (and it cannot be added).

I really hope I'm wrong.  Please tell me so.  Or do I have to write an Apex trigger instead?  I can grant the guest site user access to Visualforce pages and Apex classes, but was hoping to make it button-click friendly.
Hi, 

I have below code that works fine, but I feel it could be more efficient (and hence faster). Here is the use case:
1. I have a parent account and X children accounts.
2. A custom event created at the parent account level propagates to all children account (this is built and works fine).
3. Say there are 100 child account and all the custom events are in sync with the parent - now the 101st child account is added (i.e. new account record with the designated parent account)
4. Now all existing custom events from the parent account need to be copied to the newbie account.

This code is triggered on the account after insert, before update. It currently takes about 20 seconds to import 2,000 (child) accounts.

Thanks.
public static void AddEventstoNewResidences(List<Account> newlist, Map<ID, Account> newmap)
{ 
List<Pickup_Event__c> lstResidenceEvents = new List<Custom_Event__c>();
Set<ID> IDParentAccts = new Set<ID>(); 

for(Account filldata : newlist)
{
   IDParentAccts.add(filldata.ParentId);
}

List<Custom_Event__c> lstParentPickups = 
   [Select Account__c, ...., etc.
   from Custom_Event__c 
   where Account__c in :IDParentAccts];

if(lstParentPickups.size()>0)
{
   List<Custom_Event__c> lstNewPickupsforNewResidence = new List<Custom_Event__c>();
   Map<Id, Custom_Event__c> mapEvents = new Map<Id, Custom_Event__c>( lstParentPickups );

// Here is my issue...I'm looping through all children accounts and all pick-ups, to match up the child's parent with the event's 'parent'
for(Account childAccts : newmap.values())
{
   for(Pickup_Event__c lstPickupEvents : lstParentPickups)
   {
       if(childAccts.ParentId == mapEvents.get(lstPickupEvents.Id).Account__c)   // this line probably can be done more efficiently
       {
           Custom_Event__c oResidenceEvent = new Custom_Event__c(
           Account__c = childAccts.Id,
           Name = mapEvents.get(lstPickupEvents.Id).Event_Type__c + ' - ' + sEventDate,
           Event_Type__c = mapEvents.get(lstPickupEvents.Id).Event_Type__c,
           Must_Sign_Up_By__c = mapEvents.get(lstPickupEvents.Id).Must_Sign_Up_By__c,
           , ....
          PIN_Event_ID__c = mapEvents.get(lstPickupEvents.Id).Id,
         );

        lstNewPickupsforNewResidence.add( oResidenceEvent );

     } // if(childAccts.ParentId == mapEvents.get(lstPickupEvents.Id).Account__c)

   } // for(Pickup_Event__c lstPickupEvents : lstParentPickups)

} // for(Account childAccts : mapChildAccts.values())

if(lstNewPickupsforNewResidence.size() > 0)
{ 
   insert lstNewPickupsforNewResidence;
}

} // if(lstParentPickups.size()>0)

}

 
Hi,
Has anyone done integration between Tempworks and SFDC, at least one-way, from Tempworks to SFDC?  What's involved - does Tempworks have the capability of pushing out data, or will SFDC have to pull it somehow?

Thanks.
Hi,
When I'm in Salesforce1 on Accounts or Contacts or other standard objects, the '+' is there, so that I can add a task.  When I switch to the custom object (with activities enabled), the '+' sign disappears.  How do I enable this on the custom object?

Thanks.

I have a PHP page that sends the Web2Lead information to Salesforce (the data goes to contacts, not leads).  In Salesforce I have a trigger that prevents duplicates from being inserted, based on the key of email address, lead source, and creation date.  In the sandbox and in Production this works fine and when I go to the landing page and try to create a duplicate, it won't let me (this is good).  However, every now and then duplicate contacts are still being created (at the exact same time).

 

Below is the trigger I'm using.  What can I do to effectively prevent duplicates from being inserted?

trigger AvoidWebleadDuplicatesTrigger on Contact (before insert)
{
    set <string> setEmail = new set<string>();
    set <string> setLeadSource = new set<string>();

    list <contact> currentcontacts = new list<contact>();

    for(contact acc:trigger.new)
    {
        setEmail.add(acc.Email);
        setLeadSource.add(acc.LeadSource);
    }   

    currentcontacts =   [select Email,LeadSource,CreatedDate,id
                        from contact
                        where Email in:setEmail and LeadSource in:setLeadSource and CreatedDate = TODAY];

    for(contact acc:trigger.new)  
    {
        if( currentcontacts.size() > 0 )
            acc.adderror('This contact already exists: ' + acc.Email + ' - ' + acc.LeadSource );
    }

}

 

Hi,
Has anyone done integration between Tempworks and SFDC, at least one-way, from Tempworks to SFDC?  What's involved - does Tempworks have the capability of pushing out data, or will SFDC have to pull it somehow?

Thanks.
Can anyone help explain why my trigger wont fire?  I am really stumpped.  Any help is much appreciated. 

trigger ConsultingAUMRS on Account (before update, after update) { system.debug ('Raul');{
Account Rollup = new Account();
    for (AggregateResult ar:[select sum(AUM__C)total from Investment__c Where Consultant__c !=null])
{
  system.debug('Hello1');
      Rollup.Total_Consultant_AUM__c = (decimal)ar.get('total');
       system.debug((decimal)ar.get('total'));
   }
}
}
 
Hi.  I have multiple custom buttons on a custom object, each of which corresponds to a different contract in DocuSign - and subsequently sends a different contract based on city. This means that there are currently 40 buttons to determine which contract to send from DocuSign. Needless to say, this is ridiculous and takes forever to load.

I would like to have ONE button to submit contracts, and have that button intelligently find which contract to send based on a picklist value or a formula field.

My current code for each button looks like this:
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
{!REQUIRESCRIPT("/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/ajax/20.0/apex.js")}

if({!D__c.P__c==''}) {alert("Please make sure that Status is YES and that the Check is in PASS and that the Date is filled in");
} else {
var RC = '';var RSL='';var RSRO='';var RROS='';var CCNM='';var CRCL=''; var OCO='';var DST='';var LA='';var CEM='';var CES='';varSTB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';var CRL = 'Email~{!D__c.Email__c};FirstName~{!D__c.FirstName__c};LastName~{!D__c.LastName__c};Role~A;RoutingOrder~1';var CCRM='A~Signer1';var CCTM='A~Signer';
RC = 'GetRelContentIDs("{!D__c.Id}")';
OCO='Tag';
DST='A1234567890-B0987654321-C13579';
LA='0';
STB='1';
SSB='1';
SES='1';
SEM='1';
CES='Please DocuSign these documents';
CEM='Hi-\\n\\nWe wanted to let you know some stuff... Attached is an Agreement for you to complete...';
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!D__c.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;
}


In the code sample above:
DST='A1234567890-B0987654321-C13579';
determines what template to use...

What I would like to do, is have DST='the string value of D__c.Some_Formula_Field__c' so that I can then populate this Some_Formula_Field__c with the necessary reference to the DocuSign contract automatically, so I can just use ONE button.

Can anyone help me?
I am trying to merge accounts that are being upserted from a dataload. However, when the account is matched, and I subsequently try to update the parent record, the parent is not actually being updated in salesforce. No unexpected errors are occuring.

(The Trigger is in fact also being triggered for the record in the mergedAccounts list...yet it does not appear to save). What am I missing?
//Parents are any accounts that exist in Salesforce that were not imported from UFOS 
        List<Account> parents = [SELECT Id,Name,Sales_Rep__c,Active__c,BillingCity,BillingCountry,BillingPostalCode,BillingState,BillingStreet,Comments__c,Email__c,
                                 Fax,InternalNotes__c,Phone,RecordTypeId,Sales_Rep_Initials__c,ShippingCity,ShippingCountry,ShippingPostalCode,ShippingState,ShippingStreet,
                                 Sols_Planner__c,Toll_Free__c,UFOS_Account_Type__c,UFOS_Contact1_Ext__c,UFOS_Contact1_Phone__c,UFOS_Contact2_Ext__c,UFOS_Contact2_Phone__c,
                                 UFOS_ID__c, Type FROM Account WHERE UFOS_ID__c = ''];
        
 
        List<Account> mergedAccounts = new List<Account>();
        
        for (Account a : Trigger.new)
        {
            //see if this account has a match in the parents list.
            for(Account p : parents)
            {
                if(p.Name.getLevenshteinDistance(a.Name) <= 2)
                {

                    System.Debug('Parent---->' + p.Name + ' | ' + p.Id + ' | ' + p.Type);                
                    System.Debug('Account--->' + a.Name + ' | ' + a.Id + ' | ' + a.Type);
                    
                    if(a.Type == 'UFOS Customer')
                    {
                        //Join this account to the parent....
                        p.Sales_Rep__c = a.Sales_Rep__c;
                        p.Active__c = a.Active__c;
                        p.BillingCity = a.BillingCity;
                        p.BillingCountry = a.BillingCountry;
                        p.BillingPostalCode = a.BillingPostalCode;
                        p.BillingState = a.BillingState;
                        p.BillingStreet = a.BillingStreet;
                        p.Comments__c = a.Comments__c;
                        p.Email__c = a.Email__c;
                        p.Fax = a.Fax;
                        p.InternalNotes__c = a.InternalNotes__c;
                        p.Name = a.Name;
                        p.Phone = a.Phone;
                        p.RecordTypeId = a.RecordTypeId;
                        p.Sales_Rep_Initials__c = a.Sales_Rep_Initials__c;
                        p.ShippingCity = a.ShippingCity;
                        p.ShippingCountry = a.ShippingCountry;
                        p.ShippingPostalCode = a.ShippingPostalCode;
                        p.ShippingState = a.ShippingState;
                        p.ShippingStreet = a.ShippingStreet;                    
                        p.Sols_Planner__c = a.Sols_Planner__c;
                        p.Solution_Planner__c = a.Solution_Planner__c;
                        p.Toll_Free__c = a.Toll_Free__c;
                        p.UFOS_Account_Type__c = a.UFOS_Account_Type__c;
                        p.UFOS_Contact1_Ext__c = a.UFOS_Contact1_Ext__c;
                        p.UFOS_Contact1_Phone__c = a.UFOS_Contact1_Phone__c;
                        p.UFOS_Contact2_Ext__c = a.UFOS_Contact2_Ext__c;
                        p.UFOS_Contact2_Phone__c = a.UFOS_Contact2_Phone__c;

                        p.UFOS_ID__c = a.UFOS_ID__c;                         
                        
                        mergedAccounts.add(p);
                        System.debug('mergedAccounts.size = ' + mergedAccounts.size());
                        
                        a.addError('Customer merged with Salesforce account: ' + p.Id);
                        
                        
                        
                    }
                    else //match all Accounts that are not a UFOs Customer to
                    {
                        //Do not want to create a circular dependency
                        if(a.Id != p.Id)
                        {
                            a.ParentId = p.Id;
                        }
                        
                    }
                }
            }
            
        }
        
        System.debug('final mergedAccounts.size = ' + mergedAccounts.size());
        
        if(!mergedAccounts.isEmpty())
        {
            System.debug('Merging accounts: ' + mergedAccounts);
            update mergedAccounts;
        }

 
  • August 20, 2015
  • Like
  • 0
I have an Apex Trigger that takes the list of Tasks that meet a certain criteria and finds the one with the Max Date and then populates a field on the Account with that date. The trigger works great, but I would like it so that if the list size = 0 then the field will return to null. Currently the previous value will just stay in there. Any help would be greatly appreciated.
 
trigger LastCompletedCallDate on Task (after insert, after update, before delete) { 
     
    Set<Id> acc_set = new Set<Id>();
     
    List<Account> acc_list = new List<Account>();
     
    if(trigger.isInsert || trigger.isUpdate){
    for(Task T: Trigger.new){
        if(String.valueof(T.WhatId).startsWith('001') && T.Status=='Completed' && T.Subject=='Completed Call' ){
            acc_set.add(T.WhatId);
        }
         
     }
     }
     if(trigger.isDelete){
        for(Task T: Trigger.old){
        if(String.valueof(T.WhatId).startsWith('001') && T.Status=='Completed' && T.Subject=='Completed Call' ){
            acc_set.add(T.WhatId);
        }
         
     }
     }
      
     for(AggregateResult aggregateResult:[SELECT max(Due_Date__c)MaxCDate,WhatId FROM Task WHERE WhatID IN: acc_set AND Status ='Completed' AND Subject ='Completed Call' Group By WhatId]){
         acc_list.add(new Account(Id=(id)aggregateResult.get('WhatId'),Last_Completed_Call__c=(date)aggregateResult.get('MaxCDate')));
         
          
     }
      
     try{
      
         for(Account acc: acc_List){
         if(acc_list.size()>0)
             update acc_list;
         else
             acc.Last_Completed_Call__c = null;
         }
      
     }Catch(Exception e){
         system.debug('Exception ***'+e.getMessage());
       
      }
 
}



 
Hi, 

I have below code that works fine, but I feel it could be more efficient (and hence faster). Here is the use case:
1. I have a parent account and X children accounts.
2. A custom event created at the parent account level propagates to all children account (this is built and works fine).
3. Say there are 100 child account and all the custom events are in sync with the parent - now the 101st child account is added (i.e. new account record with the designated parent account)
4. Now all existing custom events from the parent account need to be copied to the newbie account.

This code is triggered on the account after insert, before update. It currently takes about 20 seconds to import 2,000 (child) accounts.

Thanks.
public static void AddEventstoNewResidences(List<Account> newlist, Map<ID, Account> newmap)
{ 
List<Pickup_Event__c> lstResidenceEvents = new List<Custom_Event__c>();
Set<ID> IDParentAccts = new Set<ID>(); 

for(Account filldata : newlist)
{
   IDParentAccts.add(filldata.ParentId);
}

List<Custom_Event__c> lstParentPickups = 
   [Select Account__c, ...., etc.
   from Custom_Event__c 
   where Account__c in :IDParentAccts];

if(lstParentPickups.size()>0)
{
   List<Custom_Event__c> lstNewPickupsforNewResidence = new List<Custom_Event__c>();
   Map<Id, Custom_Event__c> mapEvents = new Map<Id, Custom_Event__c>( lstParentPickups );

// Here is my issue...I'm looping through all children accounts and all pick-ups, to match up the child's parent with the event's 'parent'
for(Account childAccts : newmap.values())
{
   for(Pickup_Event__c lstPickupEvents : lstParentPickups)
   {
       if(childAccts.ParentId == mapEvents.get(lstPickupEvents.Id).Account__c)   // this line probably can be done more efficiently
       {
           Custom_Event__c oResidenceEvent = new Custom_Event__c(
           Account__c = childAccts.Id,
           Name = mapEvents.get(lstPickupEvents.Id).Event_Type__c + ' - ' + sEventDate,
           Event_Type__c = mapEvents.get(lstPickupEvents.Id).Event_Type__c,
           Must_Sign_Up_By__c = mapEvents.get(lstPickupEvents.Id).Must_Sign_Up_By__c,
           , ....
          PIN_Event_ID__c = mapEvents.get(lstPickupEvents.Id).Id,
         );

        lstNewPickupsforNewResidence.add( oResidenceEvent );

     } // if(childAccts.ParentId == mapEvents.get(lstPickupEvents.Id).Account__c)

   } // for(Pickup_Event__c lstPickupEvents : lstParentPickups)

} // for(Account childAccts : mapChildAccts.values())

if(lstNewPickupsforNewResidence.size() > 0)
{ 
   insert lstNewPickupsforNewResidence;
}

} // if(lstParentPickups.size()>0)

}

 
Hi,
Has anyone done integration between Tempworks and SFDC, at least one-way, from Tempworks to SFDC?  What's involved - does Tempworks have the capability of pushing out data, or will SFDC have to pull it somehow?

Thanks.
Hi,
When I'm in Salesforce1 on Accounts or Contacts or other standard objects, the '+' is there, so that I can add a task.  When I switch to the custom object (with activities enabled), the '+' sign disappears.  How do I enable this on the custom object?

Thanks.

I found this formula referenced by a few people:

https://help.salesforce.com/HTViewHelpDoc?id=formula_examples_dates.htm&language=en_US

I'm using it to find the business age between a custom date time field called First Contact Date and the Case Created Date. We want a 12 hour day starting at 7:00 AM. Everything works fine except when the date created is between midnight and 7:00 AM. When the date created is between those hours, the value returned in the formula is a negative number. How can I fix this? I created test datetime fields so that I can test the formula with different values. Here's the formula using the test fields. Any advice?

ROUND(12*(
(5*FLOOR((DATEVALUE(Test_First_Contact_Date__c)-DATE(1996,01,01))/7) +
MIN(5,
    MOD(DATEVALUE(Test_First_Contact_Date__c)-DATE(1996,01,01), 7) +
    MIN(1, 24/12*(MOD(Test_First_Contact_Date__c-DATETIMEVALUE('1996-01-01 12:00:00'), 1)))
))
-
(5*FLOOR((DATEVALUE(Test_DateCreated__c)-DATE(1996,01,01))/7) +
MIN(5,
    MOD(DATEVALUE(Test_DateCreated__c)-DATE(1996,01,01), 7) +
    MIN(1, 24/12*(MOD(Test_DateCreated__c-DATETIMEVALUE('1996-01-01 12:00:00'), 1)))
))
), 2)

Hi,

We are facing an issue in our production environment for one of the customer while sending data to Salesforce to upsert the custom object ‘Account_Balance_by_Entity’ which has Account__c as Lookup field.

For example, we are getting the error  “Attempting to update (as part of an upsert) parent field Account__c with new value 001E000000BsqzVIAR, current value is 001E000000BsqzvIAB”.

It is noticeable that two accounts have unique Id(from url) with same order of alphanumeric combinations, one ending with lower case and another upper case.
One account has ID like 001E000000BsqzV and another like 001E000000Bsqzv.
Everything are in same order, only one ends with upper case 'V' and another ends with lower case 'v'.

We send the ‘upsert’ request to SFDC which has 001E000000BsqzV and get error for another similar ID 001E000000Bsqzv. There are many such combination of accounts in our customer’s Salesforce company.
Could you please suggest us how to fix this issue?

Any account which does not have similar other account Id then posting works fine.

Few details about custom object:
Object Name:    Account_Balance_by_Entity
API Name:          Account_Balance_by_Entity__c

Standard Fields:
Label                                     Field Name         Data Type           
Created By                          CreatedBy           Lookup(User)    
Currency                              CurrencyIsoCode             Picklist 
Intacct Entity Name        Name                    Text(80)               
Last Modified By              LastModifiedBy Lookup(User)    
Owner                                  Owner                  Lookup(User,Queue)

Custom Fields & Relationships
Field Label           API Name            Data Type                           
Account               Account__c        Lookup(Account)
Balance                Balance__c         Currency(16, 2)
External Id          External_Id__c Text(80) (External ID) (Unique Case Insensitive)

Here is the XML request and response:
Request:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Header>
      <ns1:SessionHeader>
         <ns1:sessionId>******SessionId here***** </ns1:sessionId>
      </ns1:SessionHeader>
      <ns1:CallOptions>
         <ns1:client>Intacct/1.0</ns1:client>
         <ns1:defaultNamespace xsi:nil="true" />
      </ns1:CallOptions>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <ns1:upsert>
         <ns1:externalIDFieldName>External_Id__c</ns1:externalIDFieldName>
         <ns1:sObjects>
            <ns2:type>Account_Balance_by_Entity__c</ns2:type>
            <ns2:Id xsi:nil="true" />
            <Account__c>001E000000BsqzVIAR</Account__c>
            <Name>ACC-US--Accruent USA</Name>
            <CurrencyIsoCode>USD</CurrencyIsoCode>
            <Balance__c>10243</Balance__c>
            <External_Id__c>001E000000BsqzV--ACC-US</External_Id__c>
         </ns1:sObjects>
      </ns1:upsert>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Response:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <upsertResponse>
         <result>
            <created>false</created>
            <errors>
               <fields>Account__c</fields>
               <message>Attempting to update (as part of an upsert) parent field Account__c with new value 001E000000BsqzVIAR, current value is 001E000000BsqzvIAB</message>
               <statusCode>INVALID_FIELD_FOR_INSERT_UPDATE
</statusCode>
            </errors>
            <id xsi:nil="true" />
            <success>false</success>
         </result>
      </upsertResponse>
   </soapenv:Body>
</soapenv:Envelope>



<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Hi,

I am having a visual workflow where i am mapping certain fields from flow to a custom object,

I am able to map the text fields from flow to custom object , 

But i am not able to map the picklist field to a custom field through flow,

Please let me know how to do it.

Thanks in Advance
Hi,

I am having a text field in my visualforce flow which should accept only "Yes" or "No" , other than that it shouldnt accept anyThing,

Please tell me how to achieve  it in Visual flow validation


Thanks in Advance
I am looking to create a field in my org's opportunities that display the days until the next scheduled task/activity. I would ultimately like to display that number in my reps "opportunity view" so they dont have to dig into a report for the information. I have been able to set up a number that refrences the last logged activity to show how far it has been since we last contacted them. I need to do just the opposite. If there is an open activity/taks, I need the field to display the number of days from today. Perhaps refrencing the open activities due date. A nice customer support rep suggested I familiarize myself with apex triggers.

I have a opportunity in a master-detail relationship with a custom object (related list). I need a field in the opportunity that takes a value from the MOST RECENT related custom object.

Opportunity = textbook adoption
Custom object (Class Size) = number of  students in class.

Every year there is a new class size, so we need to be able to see the sum (rollup, which I have) and we need to see the current class size. Various other formula fields run off of value.

I haven't found a way to do this using regular formulas, so I fear I need to use Apex.

Hi, 

 

I am relatively new to salesforce and not a great coder so please bear in mind! I work for a small charity with limited resources trying to make good use of our Salesforce foundation licenses.

 

Is it possible to force workflow rules to be evaluated by changing a field through apex scheduling? I have set up quite a few workflow rules and thought that having a requirement "rule date = today" for example would be enough to trigger the workflow rule on a relevant day, but this does not seem to work. My idea is to create a checkbox for each lead called "rule trigger" and tell the rules to run when it is ticked, then find some apex code to do that daily and trigger the rules.

 

My issue at the most basic level is getting workflow rules to run daily so if there is some better way to do this feel free to point me in that direction. I found these instructions which seemed to imply it was possible to get rules to evaluate daily.

 

Thanks, 

 

Peter

Once I've set the visibility on a custom object, is there a way of updating it?  Say I forgot to give Chatter users access to a custom object at the time of the custom object creation, how can I update this after the fact?

I have Salesforce enterprise and would like to automate some functionality of pushing data from our main system into salesforce.  The issue I’m running into is getting an auth token.  I can follow the pattern with a browser and it works as expected.  The issue is that I don’t want to use a browser.  I want my Java server to make an http call and get a call back with the token.  The reason it does not work is that salesforce uses javascript redirects and cookies instead of 301 and http redirects.  

I’ve seen some mention of getting a session token and then performing the operation but that will not work due to the lack of a javascript engine in my http client.  Are there any alternatives in getting this to work?