• Shashi Patowary
  • SMARTIE
  • 883 Points
  • Member since 2015

  • Chatter
    Feed
  • 27
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 133
    Replies

Hi! I am trying to edit one of our custom settings that was created for us by a consultant "Consolidated Email Body", but I cannot figure out how to add another merge field value, as an option to added. 

Right now we have <<Session.rCEvent.Event__Start_Date_Time_c>> (which is the Start Date on a campaign sessions, that we use to register attendees for fundraising events. The Campaign Session also has a Event End Date/Time which we need to add to this as well. Does anyone know where I can edit/or add merge fields to custom settings?

This is the "Manage" option to update the text for the consolidated email
User-added image

This is more information about the custom setting:
User-added image
 

When I try to create a new account, It throws me an error saying:Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger SendAccountsToConnection caused an unexpected exception, contact your administrator: SendAccountsToConnection: execution of AfterInsert caused by: System.QueryException: List has no rows for assignment to SObject: Trigger.SendAccountsToConnection: line 2, column 1
trigger SendAccountsToConnection on Account(after insert,after update) { PartnerNetworkConnection conn = [select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection where ConnectionStatus = 'Accepted' and ConnectionName = 'Johnson Controls']; List<PartnerNetworkRecordConnection> recordConnectionToInsert = new List<PartnerNetworkRecordConnection> (); for (Account acc : Trigger.new){ PartnerNetworkRecordConnection newrecord = new PartnerNetworkRecordConnection(); newrecord.ConnectionId = conn.Id; newrecord.LocalRecordId = acc.id; newrecord.SendClosedTasks = false; newrecord.SendOpenTasks = false; newrecord.SendEmails = false; recordConnectionToInsert.add(newrecord); } if (recordConnectionToInsert.size() > 0){ System.debug('>>> Sharing ' + recordConnectionToInsert.size() + ' records'); insert recordConnectionToInsert; } }
​

trigger SendAccountsToConnection on Account(after insert,after update) {
        PartnerNetworkConnection conn = [select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection  where ConnectionStatus = 'Accepted' and ConnectionName = 'abc'];
        List<PartnerNetworkRecordConnection> recordConnectionToInsert  = new List<PartnerNetworkRecordConnection>  ();
        
        for (Account acc : Trigger.new){
            PartnerNetworkRecordConnection newrecord = new PartnerNetworkRecordConnection();

            newrecord.ConnectionId = conn.Id;
            newrecord.LocalRecordId = acc.id;  
            newrecord.SendClosedTasks = false;
            newrecord.SendOpenTasks = false;
            newrecord.SendEmails = false;
            recordConnectionToInsert.add(newrecord);
        }
        if (recordConnectionToInsert.size() > 0){
            System.debug('>>> Sharing ' + recordConnectionToInsert.size() + ' records');
            insert recordConnectionToInsert;
        }
     }

 
Hi All,
     Using Developer edition i have developed an app now i want to get a managed app, Here i had got an managed app but i have added something which should not be added there (some record type which is not exist) in managed app now i need to delete but when i go and check to edit it i dint find any option from where i can delete those unwanted components.

Note: I unable to delete managed package because i have generated URL using Upload option)

User-added image
    Because of this i am unable to create another manged package as ("Your organization is configured to contain one managed package and an unlimited number of unmanaged packages.")

Question: How to delete this managed package so that i can then able to create other managed package.
Hello,

I create a account from Apex code.
Account has 2 record types.

Few profiles do not have access to one of record type.

But still the apex code, creates the account with the record type which is not accessible to the the user.

What can be reason ?
 
  • October 30, 2015
  • Like
  • 0
I have created a custom field, Product_URL for my opportunities. I would like this URL in generated quotes, but with a different link text. 
I've been working on the template, but I can't seem to get this link in the template. So what I want is "View Product" to link to the predefined product URL, in the quote.

What I tried so far:
<apex:outputLink value="{!line.Product_URL}">View Product</apex:outputLink>

However, this doesn't seem to work. I've also tried working with a href, but still no result. Anyone know how to solve this?
 
Hello,

How to put a output text in a popup and open a pop up after completion of javascript.

Thank you
  • October 28, 2015
  • Like
  • 0
Hi,

I am working on a workflow tha does not seem to be working and I think, I should go for it with a trigger, but not sure.

So this is the scenario:

ObjectP__c
Has a picklist field called State__c

ObjectE__c 
-​Has a formula field called State__c that just adds the value of the State__c field in ObjectP
-Has a text field called State2__c (which populates value of State__c on same object with a workflow update rule every time it edits), so I can use it as a condition I need in a rollup summary field on ObjectO__c (since formula fields are not available for conditioning when creating rollup summary fields).
-Has a Master-Detail relationship to ObjectO__c

ObjectO__c
I have a rollup summary field called Amount__c which basically needs to count the related ObjectE__c child records, with the condition that it will count only the ones with the State2__c with value "Active" (that at the end is coming from State__c field in ObjectE__c)

The Problem
So my issue here is that if the field State__c value of ObjectP__c changes to a different value, for example "Inactive", the State__c of ObjectE__c will also change, however, the field State2__c will remain with the old value "Active" (since it will only change if I edit the ObjectE__c record to trigger the workflow), giving me an incorrect Count of "Active" child records on the rollup summary field on ObjectO__c.

It is not an option for the customer, that every time he changes the State on the ObjectP__c record, to make a second step and update the ObjectE__c record, so the value on State2__c will be same as in ObjectP__c to count correctly the records on ObjectO__c

So my question is, how can I achive this? With a Trigger? if so, can you provide an example? or there another option for achiving this? I may think of a trigger that every time ObjectP__c State__c changes to change the value automatically on State2__c field on ObjectE__c, with out having to edit the record and save it. I need the value of field State2__c field on ObjectE__c to always have the same value of State__c on ObjectP__c.

Thanks and any help is greatly appreciated. I am working on a school project and no way to find this.

Danny



 
Hi
I am working with our dev team to get an API set up to create leads in our Salesforce. The Authentication is fine and the API can access our Salesforce. The error returns when we try to create the Lead. The fields mapped are all correct with the API names etc so struggling to see where the issue is.
The USER set up has access to Leads and create them.
Any recommendations on what I might have missed would be great!
Thanks
Hi all, I have this :

 <apex:pageBlockTable value="{!projectList}" var="c" >
                                             
                                             <div class="rows">
                                             <apex:column headerValue="Title" headerClass="ct">
                                                 <apex:outputLink value="/{!c.id}"><apex:outputText value="{!c.Project_Title__c}" /></apex:outputLink>  
                                             </apex:column>
                                             
                                                <apex:column headerValue="End Date" value="{!c.Project_End_Date__c}" headerClass="ct"/>
                                            
                                             <apex:column headerValue="Open Cases" value="{!c.Open_Cases_TEXT__c}" headerClass="ct"/>
                                             <div id="casesRelated">
                                                 <apex:column headerValue="Cases" headerClass="ct" id="caseCol" rendered="true">
                                                     <apex:relatedList subject="{!c.id}" list="Cases__r"  />
                                                 </apex:column> 
                                             </div>
                                                 
                                             </div>

                                         </apex:pageBlockTable>

However the related list for each row only displays the cases from the very first c.Id! How do I make it iterate with the rows of the pageblocktable? Thanks, Sam!
Hello,

How is it possible to Create account from apex code.

Thanks
  • October 26, 2015
  • Like
  • 0
I have the following:
<apex:column headerValue="Contact" headerClass="ct" >

    <apex:inputField value="{!c.Contactid}" id="inputField"/>
    <apex:inputHidden id="hdnField" value="{!contactId}" />

    <apex:commandLink value="+" styleClass="btn" style="color:red;font-size:15px;"  onclick="setVar();" action="{!updateCase}" >

        <apex:param name="caseId"
                    value="{!c.Id}"
                    assignTo="{!caseId}" />

        <apex:param name="contactId"
                    value="{!contactId}"
                    assignTo="{!contactId}" />                            

    </apex:commandLink>       

</apex:column>
I'm trying to set the apex:param with the name contactId to the value of my apex:inputHiddenfield so I can pass that value to my controller when I click the command button. inputHidden is set correctly, but I can't work out how to link the param to the inputHidden value attribute?

Does anybody have any ideas?
 
 I have a basic question. I have a big VF page with many sections which render/hide based on some flags. The flags are set in constructor of controller extension and are mostly depend on the logged-in user profile, role etc. (i.e. they do not change value). Now I am trying to make my constructor thin and move these flags outside it in getter/setter methods. However, I want to know if these getters will always be called when they are referenced in 'rendered' on multiple sections etc. (i.e. the flags are referred in VF page multiple times). When I did some testing, it looks like they are called only first time but want to confirm my understanding. With the flags being set in constructor, I am assured that they will run only once when the page loads. But I want to reduce the code in constructor.
  • October 24, 2015
  • Like
  • 0
Hi,

I am new bie in the field of salesforce.I started with trail head.
Is it good to start or something else I need to start.
I want to make my career in this as enterprise resource.
So Please let me know.How should I Start?
Hi 
can you please help me on below wf rule condition
req: oppty is created with stage closed won/lost , user want to update that oppty ,change date(closed date) <= initial closed date +7 we need to keep same initial closed date after saving the record
for that i have created wf rule like below 

AND( 
OR( ISPICKVAL( StageName, "closed won"),ISPICKVAL(stagename, "closed Lost")),CloseDate <= 7-PRIORVALUE(CloseDate))

Error: Function PRIORVALUE may not be used in this type of formula

Thanks,
Swap.
Gurus, 
I have to call a method within a class. The problem is that this class is within a class. Please help with this. 
Below is the class:
//Methods Included: GetExcelFileURL
// Primary Port Class Name: ExportQuoteToExcelEndPoint	
public class tempuriOrg {
	public class ExportQuoteToExcelEndPoint {
		public String endpoint_x = 'https://pelcosales.schneider-electric.com/SalesForceServices/ExportQuoteToExcel/ExportQuoteToExcelService.svc';
		public Map<String,String> inputHttpHeaders_x;
		public Map<String,String> outputHttpHeaders_x;
		public String clientCertName_x;
		public String clientCert_x;
		public String clientCertPasswd_x;
		public Integer timeout_x;
		private String[] ns_map_type_info = new String[]{'http://tempuri.org/','tempuriOrg','http://schemas.microsoft.com/2003/10/Serialization/','schemasMicrosoftCom200310Serializat'};
		public String GetExcelFileURL(String username,String password,String quoteId) {
			tempuriOrg.GetExcelFileURL_element request_x = new tempuriOrg.GetExcelFileURL_element();
			tempuriOrg.GetExcelFileURLResponse_element response_x;
			request_x.username = username;
			request_x.password = password;
			request_x.quoteId = quoteId;
			Map<String, tempuriOrg.GetExcelFileURLResponse_element> response_map_x = new Map<String, tempuriOrg.GetExcelFileURLResponse_element>();
			response_map_x.put('response_x', response_x);
			WebServiceCallout.invoke(
				this,
				request_x,
				response_map_x,
				new String[]{endpoint_x,
				'http://tempuri.org/IExportQuoteToExcelService/GetExcelFileURL',
				'http://tempuri.org/',
				'GetExcelFileURL',
				'http://tempuri.org/',
				'GetExcelFileURLResponse',
				'tempuriOrg.GetExcelFileURLResponse_element'}
			);
			response_x = response_map_x.get('response_x');
			return response_x.GetExcelFileURLResult;
		}
	}
	public class GetExcelFileURL_element {
		public String username;
		public String password;
		public String quoteId;
		private String[] username_type_info = new String[]{'username','http://tempuri.org/','string','0','1','true'};
		private String[] password_type_info = new String[]{'password','http://tempuri.org/','string','0','1','true'};
		private String[] quoteId_type_info = new String[]{'quoteId','http://tempuri.org/','string','0','1','true'};
		private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','false'};
		private String[] field_order_type_info = new String[]{'username','password','quoteId'};
	}
	public class GetExcelFileURLResponse_element {
		public String GetExcelFileURLResult;
		private String[] GetExcelFileURLResult_type_info = new String[]{'GetExcelFileURLResult','http://tempuri.org/','string','0','1','true'};
		private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','false'};
		private String[] field_order_type_info = new String[]{'GetExcelFileURLResult'};
	}
}

I am trying to invoke the method " GetExcelFileURL"
tempuriOrg NewTempUri= new tempuriOrg();
 NewTempUri.ExportQuoteToExcelEndpoint.GetExcelFileURL('SalesForceIntegration','vw4','0Q0g0000000ErDN');

However, I am getting an error message:
Variable does not exist: exportquotetoexcelendpoint

This class is created from WSDL. I would appreciate any help.
 
We are using Flow to create cases, we need to assign these cases to different queues. Since FLows do no trigger Assignment rules, what other functionality can I use to make this happen without having to use code?
Hello,

I followed link to Integrate Salesforce with Google to calculate distance.
http://bulkified.com/How+to+use+the+Google+Maps+API+in+Salesforce.com

I am looking for more advise on this topic.

I want to enter two address, Start and Destination,
II want the google APi to give me details about the time, distance and mode of transport
  • October 22, 2015
  • Like
  • 0
Hello everyone,

I have been using a the following date format function to for format my date in the following format 'October 19, 2015'

The function has been working well but today we jsut found out that if the date selected is 2015-31-12, It is being formated as 'December 30, 2016' instead of 'December 30, 2015'

Does anyone knows what is causing this? 

This is how I am calling the function dateTimeScheduled.format('MMMM d, YYYY');
Hi,

How I can change my record name PRO-00139 as a hyperlink on my pageBlockTable to be able to click on this name and open record?
I'm really new to the Visualforce page and any help would be appreciated.

Screenshot
hi, 
i'm trying to update permission set from apex code but still it's incorrect can anyone help me out !
Error: actionradioab Compile Error: Variable does not exist: SobjectType at line 40 column 9

 
}
       public pagereference Assign()   
          {
        if(selectedValue == 'readselected')          
         {
        //update Object permission for Opportunity 
        actionradioab op = new actionradioab();
        op.permissionSetID = parameterValue;
        op.SobjectType = 'Opportunity';
        op.PermissionsCreate = false;
        op.PermissionsRead = true;
        op.PermissionsWrite = false;
        update op;

        }
        }
}

User-added image
 
Hi,
 
We are getting a VF page exception while generating a PDF. We pinned down to a relationship query which is trying to pull accounts and its child records. Please find the simplified query below. The query works fine if we include only one record but throws below error if we include multiple account ids in “IN” filter. Interestingly same query works fine in Production Dev console. Our prod is running on Winter,16 while sandbox is updated to Spring,16. Please let us know if this is a known issue in Spring,16.
Please note this that below sub query is causing the issue. If we remove this sub query , the query works.
(SELECT name FROM Family__r)
Query:
SELECT Name,
 (SELECT Id, Name FROM Opportunities WHERE (Status__c = 'Disbursed' OR Status__c = 'Closed')
 ORDER BY Actual_DisbursementDate__c DESC NULLS FIRST LIMIT 1),
 (SELECT name FROM Family__r),
 (SELECT id
 FROM Secondary_Customer_Details__r LIMIT 1) FROM Account
 WHERE id in ('00156000002qhwrAAA', '001560000037uexAAA')
Exception Message:
Unknown Exception
[object Object]: An unexpected error occurred. Please include this ErrorId if you contact support: 2139555223-9360 (741305289)
 
Thanks,
Shashi
 
Hi.
Getting an error message stating -
Challenge not yet complete... here's what's wrong:
The global quick action was not created or it was not named 'New Detailed Account'


I have completed all the task creating a Global Action,Adding it to Global Layout and setting default value for Type.Is is bacause of a namespace that is associated with my Dev org.

Please suggest.

Regards,
Shashi
Hi,
 
We are getting a VF page exception while generating a PDF. We pinned down to a relationship query which is trying to pull accounts and its child records. Please find the simplified query below. The query works fine if we include only one record but throws below error if we include multiple account ids in “IN” filter. Interestingly same query works fine in Production Dev console. Our prod is running on Winter,16 while sandbox is updated to Spring,16. Please let us know if this is a known issue in Spring,16.
Please note this that below sub query is causing the issue. If we remove this sub query , the query works.
(SELECT name FROM Family__r)
Query:
SELECT Name,
 (SELECT Id, Name FROM Opportunities WHERE (Status__c = 'Disbursed' OR Status__c = 'Closed')
 ORDER BY Actual_DisbursementDate__c DESC NULLS FIRST LIMIT 1),
 (SELECT name FROM Family__r),
 (SELECT id
 FROM Secondary_Customer_Details__r LIMIT 1) FROM Account
 WHERE id in ('00156000002qhwrAAA', '001560000037uexAAA')
Exception Message:
Unknown Exception
[object Object]: An unexpected error occurred. Please include this ErrorId if you contact support: 2139555223-9360 (741305289)
 
Thanks,
Shashi
 
I have a vf page where i am dynamically adding rows. I am using wrapper class to add empty rows evrytime.

On Vf page there is an action support which calls getMarket() method. The prob here is i am unable to figure out how to use discountSchedule (present in wrapper class) variable in getMarket() SOQL so that my action support will work.

Now after clicking addrow button i am getting the following error - 

 
System.NullPointerException: Attempt to de-reference a null object 
External entry point




Below is the vf page and apex class -

Apex Classs - 

    public with sharing class RFPController{

        public RFP__c accounts;
            public Custom_Package__c del;
            public List < Custom_Package__c > addattendeeList {get;set;}
            public List < Custom_Package__c > delattendeeList {get;set;}
            public List < Custom_Package__c > attendeeList {get;set;}
            public Integer totalCount {get;set;}
            
            public Integer rowIndex {get;set;}
            public Integer deleterowIndex {get;set;}
            public List < Custom_Package__c > delAttendees {get;set;}
            public Boolean isRerender{get;set;}
            //public String S {get;set;}
             public Integer numberOfRowToRemove { get; set; }
             public String selectedRowIndex{get;set;} 
            //public Integer count = 1;
             public Integer c{get; set;} 
             //public Integer counter{get;set;}
             private List<SelectOption> options;
             public List<SelectOption> AllName{get;set;}
             public List<SelectOption> AllDept{get;set;}
            // public String discountScheduleID { get; set; }
            public  string mark {get; set;}
            
            Public List<CustomPackageWrapper> cplist = new List<CustomPackageWrapper>();
            public CustomPackageWrapper cp = new CustomPackageWrapper (new Custom_Package__c() ); 
            
            private List<Custom_Package__c>  acc {get;set;}
            
            public RFPController(ApexPages.StandardController controller) {

                    isRerender = false;
                    accounts =  (RFP__c )controller.getRecord();
                    String S = 'Select id, Name, Market__c, State__c, First_Issue__c,Last_Issue__c,Circulation__c,Space_Unit__c,Per_Unit_Open_Rate__c,Space_Discount__c from Custom_Package__c ';
                    //totalCount = attendeeList.size();
                    attendeeList  = Database.Query(S);
                    attendeeList = new List < Custom_Package__c >();
                    for(integer i=0;i<1;i++){ 
                    attendeeList .add(new Custom_Package__c ());
                    }
                    delattendeeList = new List < Custom_Package__c > ();
                    delattendees = new List < Custom_Package__c > ();
                   
                    accounts.Rep_Name__c= Userinfo.getuserId();
                    c=0;
                    AllName = getMarket();
                    Alldept = getDept();
                    
            }
     
            public void addRow() {
                    isRerender = true;
                    
                   CustomPackageWrapper cw = new CustomPackageWrapper(new Custom_Package__c());
                   attendeeList1.add(cw);


            }

            

        public List<ID> discountScheduleID {
            get {
                if (discountScheduleID == null) {
                    discountScheduleID = new List<ID>();
                }
                return discountScheduleID ;
            }
            set;
        }
        
          public List<SelectOption> getDept()
        {
            List<SelectOption> options = new List<SelectOption>();
            //options.add(new SelectOption('Select','--Select--'));
            
            for(Custom_Package__c Proj  :[select Id, Name from Custom_Package__c ] )
                 {
                        system.debug('3333333'); 
                        options.add(new SelectOption(Proj.ID,Proj.Name));
                        
                 }
            return options;
            
        }
     
       
       public Integer selectedRowIdx {get; set;}

        
        public List<SelectOption> getMarket(){
            system.debug('^^^^^^^^ Entered' + discountScheduleID );
                List<SelectOption> options = new List<SelectOption>();

             for(Custom_Package__c Proj1  :[select Id,Market__c from Custom_Package__c where ID=:cp.discountSchedule ] )
                    {
                        system.debug('3333333' + discountScheduleID ); 
                        CustomPackageWrapper cp = new CustomPackageWrapper (new Custom_Package__c());
                         cp.discountSchedule.add(Proj1.Market__c );
                         cplist.add(cp );
                        options.add(new SelectOption(Proj1.ID,Proj1.Market__c ));
                        
                    }
                  
            system.debug('^^^^^^^^ Entered' + options.size());        
            return options;
            

        }
        
        public string selectedMarketIds {get; set;}  
        
            public void FindAllName()
        {
            AllName= new List<SelectOption>();
            AllDept= new List<SelectOption>();
            system.debug('!!!!!!! Entered');
            AllName = getMarket();
            Alldept = getDept();
            system.debug('&&&&&&& Entered' + AllName );

        }
        
        public List<CustomPackageWrapper> attendeeList1 {
            get {if (attendeeList1 == null)
                 attendeeList1 = new List<CustomPackageWrapper>();
                 return attendeeList1;
           }
            set;
            }



            public class CustomPackageWrapper {
            public Custom_Package__c cp {get; set;}
            public List<String> discountSchedule {get; set;}
            public Integer rowIndex {get;set;}
            
            public CustomPackageWrapper(Custom_Package__c cp) {this.cp = cp;}
            
           
            }

      
    }

VF Page - 

   <apex:page standardController="RFP__c" extensions="RFPController" sidebar="false">

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <c:FixSfdcFocusHack />
    <c:JQuery />
    <c:Chosen />
    <style type="text/css">
        .fullWidth { width: 100%; }
        .flightDateRangeText { font-size: 90%;  }

        .bPageBlock .requiredForSubmit .requiredBlock {
        background-color: #FFD700;
        bottom: 1px;
        left: -4px;
        position: absolute;
        top: 1px;
        width: 3px;
        }

        .bPageBlock .requiredForSubmitInput {
        height: 100%;
        position: relative;
        }

    </style>
    <script type="text/javascript">
    /* <![CDATA[ */

    /* 
         *  Render Chosen on select elements with the chzn-select class specified.
         */

    function renderChosen() {

            $j('.chzn-select').chosen();

    } 

    function focusChosen() {
        $j('.search-field').find("input").focus();       
    }       

    /*
         *  Render required marker on elements where class == "required".
         */
    function renderRequired() {
        $j('.required').wrap('<div class="requiredInput" />').before('<div class="requiredBlock" />');
    }

    /*
         *  Render required marker on elements with the specified ID.
         */        
    function renderRequiredComponentId(componentId) {
        $j(jq(componentId) + ' .required').wrap('<div class="requiredInput" />').before('<div class="requiredBlock" />');
    }

    var rfpRequiredIds = ["dueDate", "clientsEstablishedPartners", "campaignMarketingObjectives", "campaignGoals",
                          "scopeOfCampaign", "mediaRequested", "otherMediaRequested", "campaignTotalNet", 
                          "primaryTargetAudience", "geographies", "servingPreference", "clientServedSpecifics", "adSizes",
                          "creativeType", "richMediaType", "percentageFlash", "percentageRichMedia", "flightDateRanges"];

    var optRequiredFieldIds = ["planCompletionDate", "clientsEstablishedPartners",
                               "campaignMarketingObjectives", "campaignGoals", "scopeOfCampaign", "mediaRequested", "campaignComments",
                               "primaryTargetAudience", "geographies", "customGeoDetail", "servingPreference", "clientServedSpecifics",
                               "adSizes", "creativeType", "richMediaType", "additionalCreativeNotes"];

    //SSirikonda - 07/25/2013 - Removing the field Plan_completion_Date__c as yellow marked field when
    //RFP type drop-down = SEM   
    /*var semRequiredFieldIds = ["planCompletionDate", "url", 
           "campaignMarketingObjectives", "campaignComments", "geographies", "customGeoDetail"];*/

    var semRequiredFieldIds = ["url", 
                               "campaignMarketingObjectives", "campaignComments", "geographies", "customGeoDetail"];

    function modifyRequired() {
        $j('.requiredForSubmitInput').removeClass('requiredForSubmitInput');
        var type = $j('[id$="type"]').val();
        if (type == 'RFP') {
            $j.each(rfpRequiredIds, function(index, value) {
                var selector = '[id$="' + value + '"]';
                $j(selector).addClass('requiredForSubmitInput');
            });
        } else if (type == 'OPT') {
            $j.each(optRequiredFieldIds, function(index, value) {
                var selector = '[id$="' + value + '"]';
                $j(selector).addClass('requiredForSubmitInput');
            });
        } else if (type == 'SEM') {
            $j.each(semRequiredFieldIds, function(index, value) {
                var selector = '[id$="' + value + '"]';
                $j(selector).addClass('requiredForSubmitInput');
            });
        }
    }

    function changePrimaryContact() {
        var value = $j('[id$="primaryContact"]').val();
        var selector = '[id$="agencyContact"]';
        $j(selector).removeClass('requiredInput');
        var selector = '[id$="agency"]';
        $j(selector).removeClass('requiredInput');
        if (value == 'Agency') {
            var selector = '[id$="agency"]';
            $j(selector).addClass('requiredInput');
            var selector = '[id$="agencyContact"]';
            $j(selector).addClass('requiredInput');
        }
    }

    $j(document).ready(function() {
        renderChosen();
        renderRequired();
        clearErrors();
        changePrimaryContact();
        modifyRequired();
    });

    /* ]]> */        
    </script>
    <style>
   .twitterStyleTextbox {
    border: 1px solid #c4c4c4;
    width: 180px;
    height: 18px;
    font-size: 13px;
    padding: 4px 4px 4px 4px;
    border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    box-shadow: 0px 0px 8px #d9d9d9;
    -moz-box-shadow: 0px 0px 8px #d9d9d9;
    -webkit-box-shadow: 0px 0px 8px #d9d9d9;
}

.twitterStyleTextbox:focus {
    outline: none;
    border: 1px solid #7bc1f7;
    box-shadow: 0px 0px 8px #7bc1f7;
    -moz-box-shadow: 0px 0px 8px #7bc1f7;
    -webkit-box-shadow: 0px 0px 8px #7bc1f7;
}
 </style>


<apex:form id="myForm">
<apex:pageBlock id="pb">
        <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!Cancel}" value="Cancel"/>
         </apex:pageBlockButtons>

<apex:pageMessages />
      <apex:outputText rendered="{!isRerender}">

      </apex:outputText>      
      <apex:variable var="rowNumber" value="{!0}"/>


      <apex:pageBlockSection title="Child RFP Details" collapsible="false" id="section">

        <apex:pageBlockTable id="thetable"  var="acc" value="{!attendeeList1}" onRowMouseOver="removeHighlight(this)">

             <apex:column headerValue="Action" >
            <apex:commandLink value="Copy" reRender="pb" onclick="testMe(event)"/>
          </apex:column>

          <apex:column headerValue="Custom Package">
                 <apex:param name="rowIndex" value="{!rowNumber}"/>
                         <apex:selectList multiselect="true" value="{!acc.discountSchedule}"  styleClass="fullWidth chzn-select" size="1" style="width:400px;" >
                          <apex:actionSupport event="onchange" action="{!FindAllName}" rerender="geographies"  oncomplete="renderChosen()"/>
                        <apex:selectOptions value="{!Dept}"/>
                      </apex:selectList> 
                <apex:variable var="rowNumber" value="{!rowNumber+1}"/> 
          </apex:column>


          <apex:column headerValue="Market" id="market">
            <apex:outputPanel id="geographies" layout="block" >
          <apex:selectList id="selectedmarkets" multiselect="false" value="{!selectedMarketIds }"  styleClass="fullWidth chzn-select" size="1" style="width:150px" >

              <apex:selectOptions value="{!Market}"/>
             </apex:selectList> 
            </apex:outputPanel>
          </apex:column>

          <apex:column headerValue="State" >
            <apex:inputField value="{!acc.cp.State__c}" styleClass="twitterStyleTextbox"/>
          </apex:column>
          <apex:column headerValue="First Issue" >
            <apex:inputField value="{!acc.cp.First_Issue__c}" styleClass="twitterStyleTextbox"/>
          </apex:column>
          <apex:column headerValue="Last Issue" >
            <apex:inputField value="{!acc.cp.Last_Issue__c}" styleClass="twitterStyleTextbox"/>
          </apex:column>
          <apex:column headerValue="Circulation" >
            <apex:inputField value="{!acc.cp.Circulation__c}" styleClass="twitterStyleTextbox"/>
          </apex:column>
            <apex:column headerValue="Space Unit">
            <apex:inputField value="{!acc.cp.Space_Unit__c }" styleClass="chzn-select"/>
          </apex:column>
          <apex:column headerValue="Space Discount">
          <apex:inputField value="{!acc.cp.Space_Discount__c}" styleClass="twitterStyleTextbox"/>
          </apex:column>
           <apex:column headerValue="Per Unit Open Rate">
          <apex:inputField value="{!acc.cp.Per_Unit_Open_Rate__c}" styleClass="twitterStyleTextbox"/>
          </apex:column>

        </apex:pageBlockTable>

      </apex:pageBlockSection>
      <apex:commandButton action="{!addRow}" value="Add Row" reRender="pb" oncomplete="renderChosen()"> 
      <apex:param name="rowIndex" value="{!rowNumber}"/>

       </apex:commandButton>

</apex:pageblock>
</apex:form>
</apex:page>                

Regards
 
 
Error -
A problem with the OnClick JavaScript for this button or link was encountered:missing ; before statement

CODE -
{!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")}

try{
    var taskToCreate = new sforce.SObject("Task");

 var leadstatusupdate = new sforce.SObject("Lead");
  leadstatusupdate .Lead ID = "{!Lead.Id}";
     leadstatusupdate.Status = "Open - Voicemail / Email";
  result = sforce.connection.update([leadstatusupdate]);

    taskToCreate.OwnerId = "{!$User.Id}";
    taskToCreate.WhoId = "{!Lead.Id}";
    taskToCreate.Subject = "Voicemail";
    taskToCreate.ActivityDate = new Date();

    taskToCreate.Priority = "Normal";
    taskToCreate.Status = "Completed";

taskToCreate.Division__c = "Verdantis";
    result = sforce.connection.create([taskToCreate]);

    if(result[0].success == "true"){
        location.reload();
    }
    else{
        alert(
            "An Error has Occurred. Error: \r\n" +
            result[0].errors.message
        );
    }
}
catch(e){{!BMCServiceDesk__Task__c.BMCServiceDesk__DisplayInSS__c}
    alert(
        "An Un-expected Error has Occurred. Error: \r\n" +
        e
    );
}
 
Hi,
I am trying the Trailhead challange for Formula fields at https://developer.salesforce.com/trailhead/point_click_business_logic/formula_fields#challenge

and the challenge is to add a formula field on the Case object referencing the Last Activity Date of the Account object.

But the Account object doesn't have a Last Activity Date (and neither does the Case object) - so how can I complete that challenge?

Hi! I am trying to edit one of our custom settings that was created for us by a consultant "Consolidated Email Body", but I cannot figure out how to add another merge field value, as an option to added. 

Right now we have <<Session.rCEvent.Event__Start_Date_Time_c>> (which is the Start Date on a campaign sessions, that we use to register attendees for fundraising events. The Campaign Session also has a Event End Date/Time which we need to add to this as well. Does anyone know where I can edit/or add merge fields to custom settings?

This is the "Manage" option to update the text for the consolidated email
User-added image

This is more information about the custom setting:
User-added image
 

When I try to create a new account, It throws me an error saying:Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger SendAccountsToConnection caused an unexpected exception, contact your administrator: SendAccountsToConnection: execution of AfterInsert caused by: System.QueryException: List has no rows for assignment to SObject: Trigger.SendAccountsToConnection: line 2, column 1
trigger SendAccountsToConnection on Account(after insert,after update) { PartnerNetworkConnection conn = [select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection where ConnectionStatus = 'Accepted' and ConnectionName = 'Johnson Controls']; List<PartnerNetworkRecordConnection> recordConnectionToInsert = new List<PartnerNetworkRecordConnection> (); for (Account acc : Trigger.new){ PartnerNetworkRecordConnection newrecord = new PartnerNetworkRecordConnection(); newrecord.ConnectionId = conn.Id; newrecord.LocalRecordId = acc.id; newrecord.SendClosedTasks = false; newrecord.SendOpenTasks = false; newrecord.SendEmails = false; recordConnectionToInsert.add(newrecord); } if (recordConnectionToInsert.size() > 0){ System.debug('>>> Sharing ' + recordConnectionToInsert.size() + ' records'); insert recordConnectionToInsert; } }
​

trigger SendAccountsToConnection on Account(after insert,after update) {
        PartnerNetworkConnection conn = [select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection  where ConnectionStatus = 'Accepted' and ConnectionName = 'abc'];
        List<PartnerNetworkRecordConnection> recordConnectionToInsert  = new List<PartnerNetworkRecordConnection>  ();
        
        for (Account acc : Trigger.new){
            PartnerNetworkRecordConnection newrecord = new PartnerNetworkRecordConnection();

            newrecord.ConnectionId = conn.Id;
            newrecord.LocalRecordId = acc.id;  
            newrecord.SendClosedTasks = false;
            newrecord.SendOpenTasks = false;
            newrecord.SendEmails = false;
            recordConnectionToInsert.add(newrecord);
        }
        if (recordConnectionToInsert.size() > 0){
            System.debug('>>> Sharing ' + recordConnectionToInsert.size() + ' records');
            insert recordConnectionToInsert;
        }
     }

 
Hi,

I've to know that if I create a new profile. And edit this proflie and change the some object permission like uncheck the delete checkbox for a custom object. Then If I send this profile to production then that custom object will have checked or unchecked delete check box or not.

Thanks
Ashlekh Gera
Hi All, 

I have a requirement to attach a word document as an attachment to certain records. I started with creating a static resource with the document. Now, I have difficulty to include that static resource as an attachment from my apex code. Is there any other process to meet this requirement or any input for attaching static resource will be helpful. 
Hi Everyone,
can someone provide me any references or list out What are the approximate dates or months of salesforce releases?
  • November 03, 2015
  • Like
  • 0
hi, 
    i'd been trying to change a standard field's "read only" security type.is there a way to change it?
Hi All,
     Using Developer edition i have developed an app now i want to get a managed app, Here i had got an managed app but i have added something which should not be added there (some record type which is not exist) in managed app now i need to delete but when i go and check to edit it i dint find any option from where i can delete those unwanted components.

Note: I unable to delete managed package because i have generated URL using Upload option)

User-added image
    Because of this i am unable to create another manged package as ("Your organization is configured to contain one managed package and an unlimited number of unmanaged packages.")

Question: How to delete this managed package so that i can then able to create other managed package.
I have created a custom field, Product_URL for my opportunities. I would like this URL in generated quotes, but with a different link text. 
I've been working on the template, but I can't seem to get this link in the template. So what I want is "View Product" to link to the predefined product URL, in the quote.

What I tried so far:
<apex:outputLink value="{!line.Product_URL}">View Product</apex:outputLink>

However, this doesn't seem to work. I've also tried working with a href, but still no result. Anyone know how to solve this?
 
Hello,
 
https://servicesgateway.com/{version}/rest/{service}
 <ConfigElement name="cAccount" Url="https://servicesgateway.com/1/rest/searchByName" ContractID="XXXX" UserPrefix="XXXXXXX" UserID="XXXXX" Password="XXXXX" AppID="XXX" Version="1" />

I have a above link, which is link for web service.

I want to get the data from this link.

What are steps to do so using REST 

Thanks
  • October 13, 2015
  • Like
  • 1
I'm doing the simple lightning components challenge and have hit this problem in my existing trailhead org and a brand new dev org that I've just created:

Challenge not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: QVWBQHAG