• Developer129
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 13
    Replies

Hi,

 

I am making an application and I wanted to know how I can restrict access to custom object data based on the department concept. For example I have a custom object A and have got departments Human Resource, Accounts, IT etc. that the users are a part of. Now when the records of custom objects are being made I want to specify which department users can have access to it. Is there a way to implement this concept in salesforce.

 

Thank You 

Hi,

 

Is it possible to add approved custom records in Salesforce.

 

Thanks

Hi,

 

I have got a custom list, in the list items one of the columns consist of an input field and at the end of each record i want to place a button or link that would submit a form only specific to that record of the list. How can this be done in salesforce?

 

Thanks

Hi,

 

Is there a way to add a functions to custom object for using them in some other objects custom extension. Situation I have is something like this, I have an custom controller extension of an object A, i want to add a function to object B so that I can use that in object A controller extension visualforce page.

 

Thanks

Hi,

 

I am having problems working with the StandardSetController class, I have setPageSize to '2' however when I call getRecords() it keeps on giving me all the records. Also getResultSize() is equal to 3

 

Is this a bug or am i doing something wrong

 

Thanx

Hi,

 

I need to know what is the best approach for using XML data in salesforce. The situation I have is something like this, I have to use a XML file that is served by an external server and then use that data to make table in salesforce. Method of getting the XML file is simply by URL

 

Thanks

Hi,

 

Is there a way to remove submit for approval button once the record is approved.

 

Thanks

Hi,

 

I have got a validation rule on an object which is as following, output from system log:

 

4:38:17.264|VALIDATION_FORMULA|AND (
OR( !CONTAINS( NULLVALUE(Status__c, 'null'), 'Approved') ),
Parking_Pass_Requested__c > Ticket_Blocks_1__r.Parking_Pass_Available__c
)|Parking_Pass_Requested__c=5 , Ticket_Blocks_1__r.Parking_Pass_Available__c=0.0 , Status__c=null
4:38:17.264|VALIDATION_PASS

 

now I dont understand how validation is passed as the validation is supposed to go off when this expression is true.

 

Thanx

 


Hi,

 

I have got an object B that has a master-detail relationship with another object A (A being the parent). Now when I am logged in as admin I see the child related list, the new button for the child record on the detail page of object A, however if I change to another normal user I do not see the child related list and the new button for the child record.

 

I checked the security setting for the child, it is 'controlled by parent'. Since I am initially creating the parent record (object A)  and then going to the detail page of the parent with the same normal user therefore I presume that it should show me the option of creating the child records.

 

Help would be appreciated

Hi,

 

I was trying to execute an event and then correspondingly execute an action when a user selects a value for a lookup field. How can this be done?

 

I am using AJAX to update a part of my page depending upon the selection for the lookup field

 

 

Thanx

Hi,

 

Is there a way to customize the lookup search functionality? I know about the enhanced lookup and am already using it. What I want is that instead of showing the recently accessed records by default, it show all the records and then the user could filter on the basis of the filter fields provided.

 

Thanx

Hi,

 

Is there a way to prepopulate and show a read only field on the new/edit form (where the data is entered for the record)

 

Thanx

Hi,

 

I dont know if this is bug or whether I am doing something wrong. I have a field 'field A' in an object, I want it to be read only for a one profile X and not read only (editable) for another profile Y. I have made two page layout, one where field 'field A' is readonly and the other one where the field is not readonly (editable) and assigned each layout to the appropriate profile. After doing this for profile X I do not see the place where the value is put in for 'field A' however I keep on seeing the label for the field. Is there a way to remove the label as well, I was hoping that label should have been removed along with the place where value is put in. 

 

Thanx

Hi,

 

Is there a way in salesforce to do duplicate validation based on two object fields

 

Thanx

 

Hi,

 

I want to add a list of related objects with a customized link with each record on the detail page of a record. How can this be achieved on salesforce.

 

Thanx

Hi,

 

How can I send approval email dynamically to one or more users depending on the record? Situation I have is something like this, the record for approval could be linked to one or more users and I would like to send these users approval email. The mapping of the record to users is done in another object.

 

Thanx

Hi,

I am fairly new to salesforce. I was working with triggers and would like to know how I can access a child object two three levels deep in a trigger. e.g. the trigger is for Object A and it has child B which has child C , now I want to access object C's fields in the Object A trigger.

Thanx

Hi,

 

I am having problem working with import custom object. I am able to import records that are 10 and less from csv file, however if I import records greater then 10 then it does not work

 

Help appreciated

 

Thanx!

 

Hi Guys,

 

I am fairly new to saleforce. Was trying to install and evaluate the 'Entertainment Expense Management' app on appexchange http://sites.force.com/appexchange/listingDetail?listingId=a0N300000016YJGEA2 however wasnt able to evaluate the application fully. In most of the options I get error message 

 

"Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary."

 

Would really appreciate any help

 

 

 

Hi,

 

Is there a way to add a functions to custom object for using them in some other objects custom extension. Situation I have is something like this, I have an custom controller extension of an object A, i want to add a function to object B so that I can use that in object A controller extension visualforce page.

 

Thanks

Hi,

 

I am having problems working with the StandardSetController class, I have setPageSize to '2' however when I call getRecords() it keeps on giving me all the records. Also getResultSize() is equal to 3

 

Is this a bug or am i doing something wrong

 

Thanx

Hi,

 

I have got an object B that has a master-detail relationship with another object A (A being the parent). Now when I am logged in as admin I see the child related list, the new button for the child record on the detail page of object A, however if I change to another normal user I do not see the child related list and the new button for the child record.

 

I checked the security setting for the child, it is 'controlled by parent'. Since I am initially creating the parent record (object A)  and then going to the detail page of the parent with the same normal user therefore I presume that it should show me the option of creating the child records.

 

Help would be appreciated

Hi,

 

I was trying to execute an event and then correspondingly execute an action when a user selects a value for a lookup field. How can this be done?

 

I am using AJAX to update a part of my page depending upon the selection for the lookup field

 

 

Thanx

Hi,

 

Is there a way to prepopulate and show a read only field on the new/edit form (where the data is entered for the record)

 

Thanx

Hi,

 

I dont know if this is bug or whether I am doing something wrong. I have a field 'field A' in an object, I want it to be read only for a one profile X and not read only (editable) for another profile Y. I have made two page layout, one where field 'field A' is readonly and the other one where the field is not readonly (editable) and assigned each layout to the appropriate profile. After doing this for profile X I do not see the place where the value is put in for 'field A' however I keep on seeing the label for the field. Is there a way to remove the label as well, I was hoping that label should have been removed along with the place where value is put in. 

 

Thanx

Hi,

 

I want to add a list of related objects with a customized link with each record on the detail page of a record. How can this be achieved on salesforce.

 

Thanx

Hi,

 

How can I send approval email dynamically to one or more users depending on the record? Situation I have is something like this, the record for approval could be linked to one or more users and I would like to send these users approval email. The mapping of the record to users is done in another object.

 

Thanx

Hi,

 

I am having problem working with import custom object. I am able to import records that are 10 and less from csv file, however if I import records greater then 10 then it does not work

 

Help appreciated

 

Thanx!

 

Hi Guys,

 

I am fairly new to saleforce. Was trying to install and evaluate the 'Entertainment Expense Management' app on appexchange http://sites.force.com/appexchange/listingDetail?listingId=a0N300000016YJGEA2 however wasnt able to evaluate the application fully. In most of the options I get error message 

 

"Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary."

 

Would really appreciate any help

 

 

 

I have a custom object which has lookup fields to Account and Opportunity.  If the Account is populated, instead of using the standard search popup (which shows all opportunities, not just those belonging to the account), I want to use an Opportunity picklist which is populated with the opportunities belonging to the account whenever the account is selected/changed.  I think actionSupport is the right thing to use for this, but I can't get it to work correctly when creating a new record. It works fine in edit mode, when the account is already populated, but when creating a new record, when the search button next to account is used to pick the account, the event is not triggered (first problem).  If I just click in the account field to trigger the OnClick event, it triggers (I can see this in the system log), but the rerender does not happen.  Can anyone explain this?  I'd prefer to invoke actionSupport without having to click in the Account field, but the rerender is the bit giving me the biggest headache.

 

The page code is as follows:

 

<apex:page standardController="Call_Meeting_Report__c" extensions="OpportunitySearchController" showHeader="true" sidebar="true">
<apex:form >
<apex:pageBlock title="Call/Meeting Report" mode="edit" id="thePageBlock">
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}" immediate="true"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="2">
<apex:inputField value="{!Call_Meeting_Report__c.Account__c}" >
<apex:actionSupport event="onChange" action="{!getOpportunities}" rerender="ChooseOpp" />
<apex:actionSupport event="onkeyup" action="{!getOpportunities}" rerender="ChooseOpp"/>
<apex:actionSupport event="onclick" action="{!getOpportunities}" rerender="ChooseOpp"/>
</apex:inputField>
<apex:pageBlockSectionItem >
<apex:outputPanel id="ChooseOpp">
<apex:outputLabel value="Choose Opportunity"/>
<apex:selectList value="{!Call_Meeting_Report__c.Opportunity__c}" id="opps" size="1">
<apex:selectOptions value="{!Opportunities}"/>
</apex:selectList>
</apex:outputPanel>
</apex:pageBlockSectionItem>
<apex:inputField value="{!Call_Meeting_Report__c.Type__c}"/>
<apex:inputField value="{!Call_Meeting_Report__c.Purpose__c}"/>
<apex:inputField value="{!Call_Meeting_Report__c.Primary_Contact__c}"/>
<apex:inputField value="{!Call_Meeting_Report__c.Other_people_present__c}"/>
<apex:inputField value="{!Call_Meeting_Report__c.Next_actions__c}"/>
<apex:inputField value="!Call_Meeting_Report__c.Date__c}"/>
<apex:inputField value="!Call_Meeting_Report__c.Other_people_present__c}"/>
<apex:inputField value="{!Call_Meeting_Report__c.Discussion__c}"/>
<apex:pageBlockSectionItem />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 and the controller is:

 

public class OpportunitySearchController {

//add an instance variable for the standard controller
private ApexPages.StandardController controller {get; set;}
// the actual call/meeting report
private Call_Meeting_Report__c cmr {get; set;}
private Id a;

public List <selectOption> Opps;

// Initialise the controller
public OpportunitySearchController(ApexPages.StandardController controller) {

//initialise the standard controller
this.controller = controller;
cmr = (Call_Meeting_Report__c)controller.getRecord();
//this.a = (Account)controller.getRecord();

}

// the results from the search
public PageReference getOpportunities() {
Opps = new List<selectOption>();

a = cmr.Account__c;
system.debug('### Account is '+a);
// use some dynamic soql to find the related opportunities by name
try {
List <Opportunity> opplist = [Select o.Id, o.Name from Opportunity o Where AccountId = :a Order By o.Name];
for (Opportunity u:opplist) {
Opps.add(new selectOption(u.Id, u.Name));
system.debug('### option added -'+u.Name);
}
}
catch (Exception e) {
System.debug('### error '+e);
ApexPages.addMessages(e);
}
return null;

}


}

 

Debug log is showing that the code does get called, but the populated Opportunity pulldown does not appear on the page, which means the rerender isn't happening or I'm doing something else wrong.  Debug log:

 



18.0 DB,INFO;WORKFLOW,INFO;VALIDATION,INFO;CALLOUT,INFO;APEX_CODE,DEBUG;APEX_PROFILING,INFO
19:08:05.661|CODE_UNIT_STARTED|[EXTERNAL]VForcePage
19:08:05.662|USER_DEBUG|[27,9]|DEBUG|### Account is 001T000000Ga6kPIAR
19:08:05.662|SOQL_EXECUTE_BEGIN|[30,33]|Aggregations:0|Select o.Id, o.Name from Opportunity o Where AccountId = :a Order By o.Name
19:08:05.669|SOQL_EXECUTE_END|[30,33]|Rows:2|Duration:7
19:08:05.670|USER_DEBUG|[34,5]|DEBUG|### option added -Crazy Horses Ltd - Test 1
19:08:05.670|USER_DEBUG|[34,5]|DEBUG|### option added -Crazy Horses Ltd - Test 2
19:08:05.670|CODE_UNIT_FINISHED
19:08:05.672|VF_APEX_CALL|j_id36|{!getOpportunities}|PageReference: none
19:08:05.692|CODE_UNIT_STARTED|[EXTERNAL]VForcePage
19:08:05.692|CODE_UNIT_STARTED|[EXTERNAL]VForcePage
19:08:05.692|USER_DEBUG|[27,9]|DEBUG|### Account is 001T000000Ga6kPIAR
19:08:05.692|SOQL_EXECUTE_BEGIN|[30,33]|Aggregations:0|Select o.Id, o.Name from Opportunity o Where AccountId = :a Order By o.Name
19:08:05.702|SOQL_EXECUTE_END|[30,33]|Rows:2|Duration:10
19:08:05.702|USER_DEBUG|[34,5]|DEBUG|### option added -Crazy Horses Ltd - Test 1
19:08:05.703|USER_DEBUG|[34,5]|DEBUG|### option added -Crazy Horses Ltd - Test 2
19:08:05.703|CODE_UNIT_FINISHED
19:08:05.703|CODE_UNIT_FINISHED

 Any help would be greatly appreciated -

Erica

 

 

 

  • January 29, 2010
  • Like
  • 0