• skodisana
  • SMARTIE
  • 618 Points
  • Member since 2008

  • Chatter
    Feed
  • 24
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 4
    Questions
  • 216
    Replies

Hello,

 

What happen to records like event, contacts owned by an user which is deactivated?

Thanks,

I do not understand why the following exception occurs:

System.SObjectException: Invalid field Opportunity.Account.Name for Opportunity

Here is the code:

        string dynamicSql = 'select Opportunity.Account.Name from Opportunity';
        for(sObject row: Database.query(dynamicSql)) {                   
            string analyzeType = String.valueOf(row.get('Opportunity.Account.Name'));
        }


Note: I am using the Database.Query because sql is generated on the fly which can be for other tables.

  • February 14, 2013
  • Like
  • 0

Hello,

 

I am new to this and I want to test a simple class below but it is not executing my sql queries but through the visualforce page this works fine.

Please guide me what I am doing wrong.

 

public with sharing class FetchDocumentId
{

public String documentname{ get; set; }
public String docid{ get; set; }

public string getdocId()
{
return docid;
}
public void documentId()
{
documentname=System.currentPageReference().getParameters().get('documentname');
System.debug('doc name:'+documentname);
//documentname='Checklist_Comment_and_Feedback_Template';
try{
List<Document> lstDocument = [Select Id,Name from Document where Name =:documentname limit 1];
System.debug('!!!!!!!!!!!!!'+lstDocument);//always null
string strOrgId = UserInfo.getOrganizationId();
string strDocUrl = 'https://'+ApexPages.currentPage().getHeaders().get('Host')+ '/servlet/servlet.FileDownload?file='+lstDocument[0].Id+'&oid=' + strOrgId;
System.debug('doc url'+strDocUrl );
docid=lstDocument[0].Id;
System.debug('docid:'+docid);
}catch(Exception e){System.debug('Document not found');}
//return docid;
}

public static testmethod void testdocumentId()
    {
      FetchDocumentId d= new FetchDocumentId();

//This is the page that uses this controller
      Test.setCurrentPageReference(new PageReference('Page.OHSESMain')); 
      System.currentPageReference().getParameters().put('documentname', 'Checklist_Comment_and_Feedback_Template');
     
       Test.startTest();
       
       d.documentId();
       String docmentId=d.getdocId();
       Test.stopTest();
       
        //assert results
       System.assert(docmentId!=null,'Document is null');
        
     }

}

 

Thanks

  • February 12, 2013
  • Like
  • 0

hi friends , im new to salesforce....here is one scenario.... i need to solve it ..i have to create a validation rule on student object.. validation rule should be like this..... can anyone help me....

 

A student details once entered in Engineering Stream; should not be allowed to be added in Medical/Architecture Stream ; 

 

Created a Custom Object with a name "Student” with these custom fields.

 

a. Student Name

b. Student Email Address

c. Student Roll Number (unique number allotted for each student)

d. Student Mailing Address

e. Aggregate Marks Obtained (Percentage field).

f. Rank Obtained.

g. Major (Dropdown with Engineering/Medical/Architecture Stream).

h. Exam Conducted on (Date).

 

:

 

  • March 25, 2012
  • Like
  • 0

Hi,

 

How can I use AccountShare object in salesforce API to check if an account is no longer accessible for a particular user?

 

For example, I have two users A and B and there's an account with AccountId = 000x0xxxx123    which is owned by user A. If I set organization wide sharing settings for Accounts to be Private and then change the ownership of this account to user B, then user A is not able to access it anymore. How can I check this using the API? Right now I'm using the following query but I receive a zero-length array:

 

SELECT AccountId, AccountAccessLevel, IsDeleted FROM AccountShare WHERE AccountId = '000x0xxxx123' AND  UserOrGroupId='000x000yx456'

Hello, i have a quick question. I want to do an update using the data loader where  i need to update a lookup field with a blank value or Null. But as i give a NULL in the cell of my excel sheet an run a update it throws me an error.

 

So could please tell me how can i update the look up field with a blank value.

 

Thanks in advance. 

Is there a way to add a Clone button for accounts, just like there is one to clone contacts?  We want to create child accounts by cloning the parent account.  Thanks for the help!

Hi when i use standard clone button on Opportunity i have 2 options one is with products and the other is without products , so when i do it without products it still brings the amount filed when cloned so i thought to use a custom button for clone

 

/{!Opportunity.Id}/e?clone=1&retURL=%2F{!Opportunity.Id} 
&Opp4={! Opportunity.Account } 
&opp3={!Opportunity.Name} 
&Opp9={! Opportunity.CloseDate } 
&Opp11={! Opportunity.StageName} 
&00N30000007hHNe={!Opportunity.Parent_MPG_Id__c} 
&00N30000007h8tY={! Opportunity.Opportunity_Type__c } 
&CF00N30000004oFdw={! Opportunity.Local_Client__c } 
&00N30000004oAov={! Opportunity.Active_Latent__c } 
&00N30000004KRbS={! Opportunity.Solution_Type__c } 
&00N30000004Mwvq={! Opportunity.Opportunity_Short_Description__c } 
&00N30000006GDoh= 
&Opp7 = 
&00N30000004N7Qn= 
&00N30000004N7Qd= 
&00N30000004N7Qi=

 

and i was success in controlling all the fileds i left empty the fileds i do not want to get cloned and succeded but this **bleep** amount filed OPP7 is not working it is getting cloned if i have products on the Opportunites .

So can any one help me with this 

  • February 23, 2012
  • Like
  • 0

When I try to open the Profiles page, it never loads.  See picture below.  It stays that way forever.  There are no other items in the drop-down.  Any ideas?

 

 
All Profiles 
 
 
Loading...

Help me, to write the test class for below class.

 

 

public with sharing class AttachmentUploadController {
    public String FrameDisplay { get; set; }
    public String Imagesrc { get; set; }
 // Get & Set properties of an Attachment.
  public Attachment attachment {
  get {
      if (attachment == null)
        attachment = new Attachment();
      return attachment;
    }
  set;
  }
 // Getting Current Id of an Account & Inserting Attached file to an attachment object.
  public pagereference upload() {
    attachment.OwnerId = UserInfo.getUserId();
    attachment.ParentId = ApexPages.CurrentPage().getParameters().get('Id'); // the record the file is attached to
    attachment.IsPrivate = true;
 
    try {
      insert attachment;
      Imagesrc='https://' +ApexPages.Currentpage().getHeaders().get('Host')+ '/servlet/servlet.FileDownload?file=' + attachment.Id;
    }
    catch (DMLException e) {
      ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error uploading attachment'));
      return null;
    } finally {
      attachment = new Attachment();
    }
    ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Attachment uploaded successfully'));
    return null;
  }

static testmethod void testm1()
{
    AttachmentUploadController obj=new AttachmentUploadController ();
    obj.upload();
}
}

 

The red marked lines are not covering in my class. How can i cover those red marked lines.

  • July 19, 2011
  • Like
  • 0

Hi All,

 

I am trying to write a Field Update formula for our Account page.   I need a field called "Total_Locations_c" to have a value of "1", unless a field called "Account_Site_c" is "Corporate.  If the "Account_Site_c" field is "Corporate", then the "Total_Locations_c" can be any value.

 

For the life of me, I cannot get this done.

 

Any ideas?

 

Thanks!

Hi All,

 

I would like to restrict some users from viewing few tabs and allow them to view only 2 or 3 tabs. How can I do this in Salesforce? Is it related to profiles? I do not have any role heirarchy setup.Any help on this is greatly appreciated.

  • December 04, 2010
  • Like
  • 0

Hey Guys, Im trying to create a quick validation rule for when someone picks a value from picklist A, any value, then Picklist B becomes required. This is what I have so far.

 

 

 

AND(ISPICKVAL(Picklist_A__c, ""), ( ISPICKVAL(Picklist_B__c, "")))

 

I just can't figure out how to make the Picklist A statement say "If I pick anything", not just something specific. Thanks for the help.

 

  • December 03, 2010
  • Like
  • 0

1. How can i track a field?

2. How can i set my own custom application as a default page instead of force.com in salesforce?

please reply....

 

Regards:

VVNRAO

  • November 23, 2010
  • Like
  • 0

The scenario is : Record automatically created when record type is  equal to  "New InstallBase".

 

                               Trigger is working fine, just want to add if condition with record type.

 

Trigger Code: 

 

 

rigger addInstallBase on Case (after insert, after update) {
  // Install bases to create
  List<Install_Base__c> installBases = new List<Install_Base__c>();
  for(Case c:Trigger.new) {
  
      
  
    // if(c.recordtype.name.equals("Post Install Warranty Registration")
   // {
    // If the old version had an unchecked box...
    if(Trigger.isInsert || !Trigger.oldmap.get(c.id).Approve__c) {
      // And the new version has a checked box...
      if(c.Approve__c) {
        // Add a new Install Base
        installBases.add(new Install_Base__c(
          // Assign values from case here, some examples...
          Case__c=c.id,project_size__c=c.Project_Size_kWp__c));
      }
   // }
    }
  }
  
 Appreciate your response.
Thanks,
Dhairya

 

 

 

Hello,

 

I wrote a trigger that fires a new custom object (AED_Campaign__c) when a new OpportunityLineItem is added to an Opportunity.

The trigger is working fine even when I've added definition of Record Types.

The problem is that when I try to test the trigger I receive some errors taht don'0t understand very well.

 

Code is the following:

 

 

trigger AddCampaign on OpportunityLineItem (after insert) {


//Query for the Account record types
     List<RecordType> rtypes = [Select Name, Id From RecordType 
                  where sObjectType='AED_Campaign__c' and isActive=true];
     
//Create a map between the Record Type Name and Id for easy retrieval
     Map<String,String> CampaignsRecordTypes = new Map<String,String>{};
     for(RecordType rt: rtypes)
     CampaignsRecordTypes.put(rt.Name,rt.Id);
     
  
        
         

 for (OpportunityLineItem oli : Trigger.new) {
 
     if (oli.Implementation_DirectTrack__c == 'Yes') {
 
        AED_campaign__c cam = new AED_campaign__c (
            Name = oli.Magic_Id__c,
            Opportunity__c = oli.OpportunityId,
            Sales_Mode__c = oli.AED__Sales_Mode__c,
            Implementation_DirectTrack__c = oli.Implementation_DirectTrack__c, 
            Country__c = oli.AED__Country__c,
            Product__c = oli.ProductTr__c,
            Channel__c = oli.Channel__c,
            RecordTypeId=CampaignsRecordTypes.get('DirectTrack')
        );
        insert cam;
    }
    
    else if (oli.Implementation_DirectTrack__c == 'No') { 
    
        AED_campaign__c cam = new AED_campaign__c (
            Name = oli.Magic_Id__c,
            Opportunity__c = oli.OpportunityId,
            Sales_Mode__c = oli.AED__Sales_Mode__c,
            Implementation_DirectTrack__c = oli.Implementation_DirectTrack__c, 
            Country__c = oli.AED__Country__c,
            Product__c = oli.ProductTr__c,
            Channel__c = oli.Channel__c,
            RecordTypeId=CampaignsRecordTypes.get('No_DirectTrack')
        );
        insert cam;
        }
     else {}

}
}

Thetest I'm using is the following:

 

 

/**
 * This class tests the trigger named AddCampaign.
 */
@isTest
private class AddCampaignTriggerTest {

    static testMethod void AddCampaignTest() {       
                    
        //Data Prep
        
        //Create Account, Opportunity, Product, etc.
        Account acct1 = new Account(name='test Account One1');
        acct1.Type = 'Advertiser';
        insert acct1;
        
        //Create Opportunity on Account
        Opportunity Oppty1 = new Opportunity(name='test Oppty One1');
        Oppty1.AccountId = acct1.Id;
        Oppty1.StageName = 'Test';
        Oppty1.CloseDate = Date.today();
        Oppty1.AED__Campaign_Start_Date__c = Date.today();
        Oppty1.AED__Campaign_Close_Date__c = Date.today()+1;
        Oppty1.AED__Invoice_Client_Name__c = acct1.Id;
        Oppty1.AED__Country__c = 'Spain';
        Oppty1.Campaign_Name_Agreement__c = 'test Oppty One1' ;
        Oppty1.Implementation_DirectTrack__c = 'Yes';
        Oppty1.Implementation_DT_Status__c = '1. Create Campaign';
       
        insert Oppty1;   
        
         //Create Opportunity on Account
        Opportunity Oppty2 = new Opportunity(name='test Oppty One2');
        Oppty2.AccountId = acct1.Id;
        Oppty2.StageName = 'Test';
        Oppty2.CloseDate = Date.today();
        Oppty2.AED__Campaign_Start_Date__c = Date.today();
        Oppty2.AED__Campaign_Close_Date__c = Date.today()+1;
        Oppty2.AED__Invoice_Client_Name__c = acct1.Id;
        Oppty2.AED__Country__c = 'Spain';
        Oppty2.Campaign_Name_Agreement__c = 'test Oppty One2' ;
        Oppty2.Implementation_DirectTrack__c = 'No';
        
       
        insert Oppty2;              
                        
       // Create Products 
         Product2 testprod1 = new Product2 (name='test product one1');
         testprod1.productcode = 'test pd code1one';
         insert testprod1;
         
         Product2 testprod2 = new Product2 (name='test product two2');
         testprod2.productcode = 'test pd code2two';
         insert testprod2;

// Ger Pricebook
         Pricebook2 testpb = [select id from Pricebook2 where IsStandard = true];   

// Add to pricebook
         PricebookEntry testpbe1 = new PricebookEntry ();
         testpbe1.pricebook2id = testpb.id;
         testpbe1.product2id = testprod1.id;
         testpbe1.IsActive = True;
         testpbe1.UnitPrice = 250;
         testpbe1.UseStandardPrice = false;
         insert testpbe1;
         PricebookEntry testpbe2 = new PricebookEntry ();
         testpbe2.pricebook2id = testpb.id;
         testpbe2.product2id = testprod2.id;
         testpbe2.IsActive = True;
         testpbe2.UnitPrice = 250;
         testpbe2.UseStandardPrice = false;
         insert testpbe2;
         
         
                //And now you want execute the startTest method to set the context 
                //of the following apex methods as separate from the previous data 
                //preparation or DML statements.  
        test.starttest();
        
          // add the line item which should call the trigger
          // with this line item it should fail out quickly 
          // As Auto Schedule is false
    OpportunityLineItem oli1 = new OpportunityLineItem();
    oli1.Quantity = 1;
    oli1.TotalPrice = 1;
    oli1.PricebookEntryId = testpbe1.id;
    oli1.OpportunityId = oppty1.id;    
    insert oli1;   
    
            
          // add the line item which should call the trigger
          // Auto Schedule is true so it should build the schedule.
    OpportunityLineItem oli2 = new OpportunityLineItem();
    oli2.Quantity = 1;
    oli2.TotalPrice = 1;
    oli2.PricebookEntryId = testpbe2.id;
    oli2.OpportunityId = oppty1.id;    
    insert oli2;
     
                         
          // add the line item which should call the trigger
          // Auto Schedule is true so it should build the schedule.
          // This uses a date on OpptyLineItem to try another code path
    OpportunityLineItem oli3 = new OpportunityLineItem();
    oli3.Quantity = 1;
    oli3.TotalPrice = 1;
    oli3.ServiceDate = date.today();
    oli3.PriceBookEntryId = testpbe2.id;
    oli3.OpportunityId = oppty1.id;    
    insert oli3;
    
           
        test.stoptest();
    }
}

 Message Error:

 

 

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, AddCampaign: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, Record Type ID: id value not valid for the users profile: : [RecordTypeId] Trigger.AddCampaign: line 31, column 9: []


Class.AddCampaignTriggerTest.AddCampaignTest: line 73, column 5 External entry point

 

 

 

 

Someone can help me?

 

Thanks,

 

Stefano

 

 

 

 

 

I am enabling Web to Lead functionality but would like to pass data through the form that is invisible to the person completing the form.  For example, on my Web site I want to have a link that says 'Sign up to our newsletter', on clicking this the user is taken to a Web to Lead form where they are asked for a name, email address etc.  I have a Lead checkbox field called 'newsletter' that I want to set to 'T' for leads set up through this Web to Lead form but I do not want the person filling in the field to have to click on this checkbox.  I do however what the Web to Lead form input to contain a value of 'T' for this field.

 

I realise that there are a few ways to get around this particular example, (set the default for this field to 'T' for example) but I am looking for a generic solution here that I can use in other instances.

 

Thanks in advance

Lawrance

I have a custom object called Inventory that is tied to the Opportunity object. On the inventory object I have a custom button that creates a new inventory record and copies the opportunity name, picks the appropriate record type, etc.

 

The problem I am having is putting this button that is on the inventory object onto the inventory related list section on the opportunity page layout, only a New button is available. Is this a limitation?

 

I would not even need to do this if the button would show up on our users blackerry's at the top of the opportunity page layout, which is where the button originally was before I moved it to the inventory object,

  • November 17, 2010
  • Like
  • 0

I would iike to display the name of the original case owner on the case page after a case is reassigned.  I have created a field Level 1 Owner Id where I capture the original owner id upon reassignment.  But, I have been unable to figure out how to the display the name of the original owner from the id value stored in  Level 1 Owner Id.  There must be a way..  Please help.

  • November 15, 2010
  • Like
  • 0

Hi,

 

I have a VF page that has a custom button called "Send Email".

I have embedded this VF on the custom object page layout.

I am able to send an email and the functionality is working fine.

 

I need to only enable this button based on a field value of the custom object called Status__c.To certain extent i was able to do so using "Rendered" property of the "form" tag(code in red, below). This will either render the button or does not render.

But i want this button to be grayed out  when it does not match the criteria so that users know that they cannot click this and still be able to see the button.

 

Any help on this is highly appreciated. If i am not clear , pls feel free to ask your questions. Thanks!

 

VF Page:

 

<apex:page standardController="echosign_dev1__SIGN_Agreement__c" extensions="sendEmail">
    <apex:form rendered="{!(echosign_dev1__SIGN_Agreement__c.echosign_dev1__Status__c!='Signed')}" >
        <apex:commandButton Value="Send Email" action="{!SendEmail}" />
    </apex:form>
  
</apex:page>
Hi,

Receiving below error while sending request to one of the web service with certificate. Please help me.
And also any idea on how to convert DER certificate to PKCS12.

Thanks,
Srikanth. K

Hi,

 

I am planning to take Dev 501 salesforce advanced developer certification exam. Please post if any questions OR training guide.

 

Thanks,

Kodisana

Hi,

 

I have one apex class which is invoked from the Cron kit trigger. In my class i am updating records using two different lists, each list is having 60 records. Both updation are consider as separate DML statement but the records in the List are appending and it is throwing Too many DML rows 120. Even though i am having two different list why it is giving error.

 

Please  suggest me on this.

 

Thanks & Regards

Srikanth.K

 

 

 

 

Hi,

 

I want to update the Campaign Member Status using the Force.com Sites. I just want ot know how i can pass the Campaign Member Id the Force.comSites URL. I have written one Custom Controller which will update the Camapign Status. Here i hardcoded the Campaign Member. Please suggest me how to pass theCampaign Member Id to the Sites URL.

 

Ex Site URL:http://Mysites-developer-edition.na6.force.com/test?id=701800000009EWSX

 

"701800000009EWSX" This isCampaign Member Id.

 

 

Thanks

Srikanth.K

 

I have to populate the "Change" field for the last completed process as well as the first uncompleted process.

 

This should happen as soon as the completed field is set to Yes progressively.

How can I do it.

 

Note: In my VF page only the "Enabled" records can be changed/toggled between ''yes/'no'.

 

Is it possible to do it without coding?

 

Example Situation 

Process Name   |   Sort_order__c   |   Completed   |    Change   |   

     Plan                 |             1                 |           Yes         |    Disable   |

    Design             |             2                 |           Yes        |      Enable   |

    Execute            |             3                 |            No         |      Enable   |

       Test               |             4                 |             No        |     Disable   |

        Validate       |              5                |             No        |      Disable  |

 

 

Example Situation 

Process Name   |   Sort_order__c   |   Completed   |    Change   |   

     Plan                 |             1                 |           Yes         |    Disable   |

    Design             |             2                 |            Yes         |    Disable   |

    Execute            |             3                 |           Yes        |      Enable   |

       Test               |             4                 |            No         |      Enable   |

        Validate       |              5                |             No        |      Disable  |

 

 

Example Situation 

Process Name   |   Sort_order__c   |   Completed   |    Change   |   

     Plan                 |             1                 |           Yes         |    Disable   |

    Design             |             2                 |          Yes         |    Disable   |

    Execute            |             3                 |          Yes         |    Disable   |

       Test               |             4                 |           Yes        |      Enable   |

        Validate       |              5                |            No         |      Enable   |

 

 

 

 

 

Thanks in advance

 

  • June 10, 2013
  • Like
  • 0

I can't attach a screen shot, but if you to into Cases and click Go! on your views, you get a list with checkboxes and buttons to choose from.  I want to create this for a custom object, but I have no idea how.  Can anyone please help?

  • March 25, 2013
  • Like
  • 0

Hi all

 

I have a new record type(appointed) in a custom object named DFS. I need to send the mass emails to that record type list. Please let me know if there are any ways.

 

Thanks

  • March 25, 2013
  • Like
  • 0

We have two case types: Feature and Bug; and I would like to add a field to the account layout that counts the number of each. Thanks for your help.

  • February 18, 2013
  • Like
  • 0

Hi,

 

I've a list of records(rows) for a custom object(table) where i want to apply crud operations i.e. create new object instance (record), update the existing ones (editng the records not inline instead in a new page). i want to use only one controller for all the operations.

 

please let me know the possible solutions.

 

thanks in advance.

Hello,

 

What happen to records like event, contacts owned by an user which is deactivated?

Thanks,

When I click on Mass Email Users.. I have this message Your organization's email privileges have been revoked due to non-compliance with our Terms of Use. Please contact your salesforce.com administrator or submit a case to have a salesforce.com representative contact you. Click here to return to the previous page. Can anyone help on this issue... Regards,

I do not understand why the following exception occurs:

System.SObjectException: Invalid field Opportunity.Account.Name for Opportunity

Here is the code:

        string dynamicSql = 'select Opportunity.Account.Name from Opportunity';
        for(sObject row: Database.query(dynamicSql)) {                   
            string analyzeType = String.valueOf(row.get('Opportunity.Account.Name'));
        }


Note: I am using the Database.Query because sql is generated on the fly which can be for other tables.

  • February 14, 2013
  • Like
  • 0

Hi

 

How to update a text field based on Date field?

 

Hi,

 

 

I have a Salesforce Enterprise Edition license. The org ID is shared between two different offices, with two different system administrators. Each office has its own customization requirements including custom objects, workflow rules, and Apex classes. Is there a way to limit access to customization of objects and viewing of objects for each system administrator. 

 

Example:

Office A uses customization 1 and Customization 1 is created by administrator A. 

Office B uses customization 2 and customization 2 is created by administrator B. 

 

The goal is that Administrator B does not have access  to (or view of) any of Administrator A's custom objects, workflow rules, Apex classes, and VisualForce pages. 

 

Can this be done? If so, how?

If not, any ideas would be much appreciated.

 

Thanks,

Nichole

  • February 14, 2013
  • Like
  • 0

Hi All,

Can we use data in the development org when writing test classes.

Deployment is done using eclipse. will the deployment fail if if we depend on data on developer org ?

Thanks

  • February 14, 2013
  • Like
  • 0

Hello. I am having an odd problem.

 

For some reason I canot log into my sandbox (although I am almost certain that I am using the correct password).  Yes, I am logging in from "test.salesforce.com"

 

I tried to use the "Forgot your password" link to get my password e-mailed to me.  Unfortunately, it has been over 12 hours and I have not yet received an e-mail (and have checked my spam folder too).

 

Any thoughts?  Has the login procedure changed for sandboxes with the latest release?

 

Thanks.

i created a custom object with name Meeting Master in this i have to create a custom formula text field value of this custom field hould be name of owner of this record i select formula then field type to text after that when formula window come 

then i write OwnerId its a correct field but when i write Owner.name it is saying owner is not a valid field??please tell the formula how to set value of formula field to owner name??

How would like to know how can i restrict related list based on profiles in visualforce page.Can u  please give me small example for this.

This is a fun one, but need a little help.  

 

I am making a validation rule based on Close date and Opportunity Stage and I can't see why it's not working.  

 

 

AND ( 
OR ( 
NOT(ISPICKVAL( StageName, "Closed Won")), 
NOT(ISPICKVAL( StageName, "Closed Lost"))), 
CloseDate < TODAY() 
)

 

 

Basically the requirement is that if the close date is in the past, you cannot update the opportunity stage to Closed Won or Close Lost.  Here is what I got.  It doesn’t seem to be working?  Any help?

 

 

 

  • February 12, 2013
  • Like
  • 0

Parent object : Activity

Child Object : Claim (status is field in claim which can have values Cancelled / Closed).

 

Get all activities in SOQL for which all claims are closed / Cancelled.

 

Thanks

 

Hi,

can we put profile based permission on records of an object?
I have a situation like profile Dev specialist can only see those records  rows where <object>.<field name>.<Vendor Name> = <Current User>.<Company>(profile)...
 
please tell me whether we can do this or not

All,

       I tried a invoking a webservice from the sfdc environment. I am getting the below error message -  IO Exception: DER input, Integer tag error 

 

Details - 

 

In my Class i included the Certificate and Passed the Basic Authorization also.  Below is the Class i wrote -

 

 

    public void callWebService()
        {     
        //Create and set the request data
        WMWebService.eventInput data = new WMWebService.eventInput();
        data.outage_number = outage_number;
          

        String username = 'SFDC';
        String password = 'SFDC';
        
        WMWebService.SDFC_WebService_Service_Port webclient = new WMWebService.SDFC_WebService_Service_Port webclient();
        webclient.inputHttpHeaders_x=new Map<String,String>();
        Blob headerValue = Blob.valueOf(username + ':' + password);
        String authorizationHeader = 'Basic ' +EncodingUtil.base64Encode(headerValue);
        System.debug('Authorization - '+authorizationHeader);
        webclient.clientCertPasswd_x = '';
        webclient.inputHttpHeaders_x.put('Authorization','authorizationHeader');
        webclient.clientCert_x =
        'MIIE7TCCA9WgAwIBAgIQRFHQafx0RAOvfWR70P5XwTANBgkqhkiG9w0BAQUFADBr'+
        'MQswCQYDVQQGEwJVUzEtMCsGA1UEChMkVHJ1c3RlZCBTZWN1cmUgQ2VydGlmaWNh'+
        'dGUgQXV0aG9yaXR5MS0wKwYDVQQDEyRUcnVzdGVkIFNlY3VyZSBDZXJ0aWZpY2F0'+
        'ZSBBdXRob3JpdHkwHhcNMDkwOTE0MDAwMDAwWhcNMTAwOTE0MjM1OTU5WjCB6DEL'+
        'MAkGA1UEBhMCVVMxEzARBgNVBBETCjA2ODI4LTAwMDExCzAJBgNVBAgTAkNUMRIw'+
        'EAYDVQQHEwlGYWlyZmllbGQxHTAbBgNVBAkTFDMxMzUgRWFzdG9uIFR1cm5waWtl'+
        'MQswCQYDVQQKEwJHRTEXMBUGA1UECxMOSW5mcmFzdHJ1Y3R1cmUxLTArBgNVBAsT'+
        'JFByb3ZpZGVkIGJ5IEdlbmVyYWwgRWxlY3RyaWMgQ29tcGFueTEXMBUGA1UECxMO'+
        'RW50ZXJwcmlzZSBTU0wxFjAUBgNVBAMTDTE5Mi44OC4yMTIuODIwgZ8wDQYJKoZI'+
        'hvcNAQEBBQADgY0AMIGJAoGB43AMEUbg+Q15PNvtN8yrmMNAf0X3KWPFrmJd1M0h'+
        'DQaA30nCkEOeJVZfRgjfer343MuNsPHzdwctCf7jlNFK4EemuTwqVobBrtC4DraI'+
        '6Q4JXDi5v7mdTh1Vg1Fc8SEsDjlJ1fGUTrWzO4kvjYUg2j8aMi/u0/hzLUxbHshv'+
        'prC/AgMBAAGjggGRMIIBjTAfBgNVHSMEG433DAWgBQxlflM+yx4iHjtrODIv/ZeZ'+
        '5jAdBgNVHQ4EFgQUgd3Um3c1uWDjO7Zf2oNGEfGw4HcwDgYDVR0PAQH/BAQDAgWg'+
        'MAwGA1UdEwEB/wQCMAAwHQYDVR0lB5353BYwFAYIKwYBBQUHAwEGCCUFBwMCMEsG'+
        'A1UdIAREMEIwQAYLKwYBBAGyMQE54CAggwMTAvBggrBgEFBQcCRYjaHR0DovL3d3'+
        'dy5jc2N0cnVzdGVkc2VjdXJlLmNvbS9jcHMwgaYGA1UdHwSBnjCBmzBLoEmgR4ZF'+
        'aHR0cDovL2NybC5jc2N0cnVzd54GVkc2VjdXJlLmNvbS9UcnVzdGVkU2VjdlQ2Vy'+
        'dGlmaWNhdGVBdXRob3JpdHkuY3JsMEygSqBIhkZodHRwOi8vY3JsMi5jc2N0cnVz'+
        'dGVkc2VjdXJlLmNvbS9Ucn932VzdGVkU2VjdXJlQ2VydGlmaWNhdGVBdXRob3Hku'+
        'Y3JsMBgGA1UdEQQRMA+CDTE5Mi44OC4yMTIuODIwDQYJKoZIhvcNAQEFBQADggEB'+
        'AH5EAwTv4EDqpHWoYfonUikaYtmJCCmrTBsNB3rFFLg/bHQPPS58/8Qozok5MCXy'+
        'BpvIPMf5mg1UIw0mwKTPPe5K4UmlzgnyZEs2pWOLIIeu1J5zOE5Pqh/45XSzMo+N'+
        'M8dy7LY4065zhzTOPN1c0o5fgG0QeVghUBs6XRvrFQKAW9xyZx8pT7GzHEEn6Hbq'+
        'c4HgXoYSxhc3lxqiMGJVxBIKtnqbghby56432PkBejcFLz5FAtPdRQLd7dT0t3NM'+
        'RNtpmliq+Ib6j20P+Zj7CypUF6GcP+QBjTH+aw9Qsd8sG8a33GwIm5/eOmLyPJr0'+
        '3lK9AH6CfVdNeq5pMv2ojsk=';

        WMWebService.return_x response = webclient.processEvents(data);
}

 

 

Don't know what went wrong...Any ideas ??

 

Thanks,
Sanjay

Does a record get locked when you are in the edit page thus allowing your edits to be saved even if another user (including API user) edits and saves the record at the same time? And does inline editing also grant that or not?

 

Marketo Suppport is claiming that if we only use the inline edit, we will not receive the error "The record you were editing was modified by Marketo during your edit session" but I'm very skeptical of that claim.