• joseph keuler 1
  • NEWBIE
  • 70 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 14
    Replies
I have a number of lookup fields on an object. When I click the magnifying glass to select items from the lookup the Account and Contact object lookup dialogs have a "New" button next to the go.
User-added image
However, for my custom objects, there is no button to create a new record from the dialog box.
User-added image

Is there a way to have a new button from there? Or is there a way to have a custom button OR link on the Add/Edit pages such that I can quick create a record for a lookup on the parent object without leaving the page.
Otherwise, for all of my custom objects people must go to a number of different lookup objects, create the records, then go to the detail object and add all the fields.
So I have a custom object standard controller and I want to auto-populate a field on a form from the users account record.

In preparation to build my controller I need a valid SOQL statement and I'm getting nested semi-join sub selects error on the Workbench.

I'm getting errors on the SOQL query:
 
select agency_acronym__C from account 
   where id in (SELECT AccountId FROM Contact 
   where id in (SELECT ContactId FROM User 
   where id in (SELECT OwnerId FROM Application__c)))


if this where in SQL Syntax I'd just use joins. I'm new to SOQL
 
select agency_acronym__c from 
account inner join contact on account.accountID = contact.accountID
inner join user on contact.contactid = user.contactid
inner join application__c on user.id = application__c.ownerid

Thanks,
Joe
I can get the visualforce page to hide the input field but I'm unsure how to hide the associated label. How can I hide the label as well?
 
<apex:pageBlockSection id="yearInfoPageBlock" title="Fiscal Year Information">

    <apex:inputField value="{!Fiscal_Year__c.name}" onclick="test();"/>
    <apex:inputField value="{!Fiscal_Year__c.Is_Current__c}" id="isCurrent"/>

</apex:pageBlockSection>

<apex:includeScript value="{! $Resource.jQuery }"/>
    <script type="text/javascript">
        function test(){
            $('[id$="isCurrent"]').hide();

            $('[id$="isCurrent"]').hide();
        }
    </script>
So I downloaded an ODBC driver from DevART and can connect to my Salesforce schema from SQL Server Management Studio.  I ran run queries against the database.  Are there any other tools that will allow me to query Salesforce data using SQL Server syntax and flexibilty vs SOQL?

Thanks,
Joe
Is it possible to create fields on a report?  In SQL I was able to do this fairly easily.  

An example would be:

Item ----  Qty ---- price --- total (qty*price)

Do I always need to have total on the object or can I create a non-grouped-by report and have a calculated field?
 

We have a large enterprise with a number of different unrelated business units. We are looking to do a smaller Salesforce implementation with some of the smaller business units but would like to keep the enterprise in mind. Everyone is coming from the same domain and will likely use Single Sign On federated through active directory.

Is it possible to delegate admins and developers for apps only? I may have business unit A that has a development staff of 4 and 25 users but what happens when I want to bring on business unit B that has 8 developers and 2000 users?

Do developers have access to all Apex classes in the Org or is there a way those can be partitioned off between business units. I don't want developer in unit A to be able to mess with Developer B's apex class. Nor do I want developer in Unit A to query Unit B's data.

How can an enterprise limit their developer and admin permissions to the app level and have everyone under the same Org? Or is that completely impractical.

Thanks,
Joe

So I have a trigger that I want to run everytime a record is updated and created. However, when I use after insert and before update I get a record is locked error when creating the record.

How can I run this trigger on both record edit and creation (it only works before update)?   Better yet, is it possible to update any record "after update" or "after insert"?
 
trigger CalcBenefit on EA_App__c (before update, after insert) {
//works for update only.  insert throws error because I'm trying to change value
for (EA_App__C ea : Trigger.new){

    EA_App__C oldEA = Trigger.oldMap.get(ea.Id);

    if (ea.X3_Month_Income__c > CalculateBenefit.getMax(integer.valueOf(ea.Family_Size__c))){
        ea.App_Status__c = 'DENIED';            
        ea.Benefit_Amount__c = 0;                 

    }else if (ea.X3_Month_Income__c <= CalculateBenefit.getMin(integer.valueOf(ea.Family_Size__c)) && ea.App_Status__c != 'PAID'){
        //how to compare to old? 
        //&& (ea.X3_Month_Income__c != oldEA.X3_Month_Income__c || ea.Family_Size__c != oldEA.Family_Size__c)
        ea.Benefit_Amount__c = 0;                 
        ea.App_Status__c = 'SENT FOR APPROVAL';                

    }else{
        ea.App_Status__c = 'PAID';
        ea.Benefit_Amount__c = CalculateBenefit.calc(ea.X3_Month_Income__c, integer.valueOf(ea.Family_Size__c), ea.Fuel_Cost__c, '2015');
    }

}

 
Is it possible to execute a trigger on a field by itself instead of an object?  

ObjectA.Field1  on update of Field1 run trigger.  On update of ObjectA.Field2 do nothing.
So I have an Apex method running off the process builder but when I try to update a record via the invoked method it says the record is locked. Perhaps the reason it won’t update is because the process hasn’t completed yet? How can I update a record via Apex triggered from the process builder?
 
@invocablemethod
public static void updateBenefit(list<ea_app__c> app){
                app[0].Benefit_Amount__c = calcBenefit(app[0].name);
    // ----> this is the issue here  <----
    update app;
}

public static decimal calcBenefit(string appID){
    decimal benefit = 0.0;
    integer coeff = getCoefficient('2015');
    decimal max = getMax(getfamilySize(appID));
    benefit = (1-(getIncome(appID)/max))*(getFuelCost(appID)/coeff);
    return benefit;        
}

 
Hi, 

I'm creating a visual force page that shows a new default list filter to override the standard page of a custom object.  How can I get the "NEW" button such that I can open a new form to create a new record.

<apex:commandLink action="{!URLFOR($Action.Fiscal_Year__c.NewFiscal_Year__c)}" value="Create New Fiscal Year"/>
         <apex:commandButton action="{! new}" value="create new fiscal year"/>

It seems creating a controller would be overkill because I simply want to go to the add fiscal year form vs adding one directly from this form.  Any ideas? 
Is it possible to edit muliple objects on 1 page layout.  I have a relational set of objects but it appears that a user can only edit one object at a time.    Should I be using Visualforce instead to achieve this?
I'm new to the platform so I'm trying to figure out how data entry forms should be designed.

Thanks,
Joe
I have a custom object where when I click the Tab I get the recent [object] view.  How can I set my custom view as the default?  I've looked on the forums I get solutions that are for standard objects and the visual force pages are not working.  

Is the process different for custom objects?  How can I set the default view to a different view?

Thanks,
Joe 
Is there any other difference between master detail and lookup relationships outside of ownership behavior, security implications, and referential integrity between the objects?

Thanks,
Joe
So I keep getting the error:  The process did not set the correct Type value when approval outcome is Approved

see my attached setup.  

1) I added the options to the type account object
2) have the logic set on teh approval
3) have the field update options set to Pending for Intial, Customer for approval, Prospect for Rejections

Any ideas?User-added image
So I have a custom object standard controller and I want to auto-populate a field on a form from the users account record.

In preparation to build my controller I need a valid SOQL statement and I'm getting nested semi-join sub selects error on the Workbench.

I'm getting errors on the SOQL query:
 
select agency_acronym__C from account 
   where id in (SELECT AccountId FROM Contact 
   where id in (SELECT ContactId FROM User 
   where id in (SELECT OwnerId FROM Application__c)))


if this where in SQL Syntax I'd just use joins. I'm new to SOQL
 
select agency_acronym__c from 
account inner join contact on account.accountID = contact.accountID
inner join user on contact.contactid = user.contactid
inner join application__c on user.id = application__c.ownerid

Thanks,
Joe
I can get the visualforce page to hide the input field but I'm unsure how to hide the associated label. How can I hide the label as well?
 
<apex:pageBlockSection id="yearInfoPageBlock" title="Fiscal Year Information">

    <apex:inputField value="{!Fiscal_Year__c.name}" onclick="test();"/>
    <apex:inputField value="{!Fiscal_Year__c.Is_Current__c}" id="isCurrent"/>

</apex:pageBlockSection>

<apex:includeScript value="{! $Resource.jQuery }"/>
    <script type="text/javascript">
        function test(){
            $('[id$="isCurrent"]').hide();

            $('[id$="isCurrent"]').hide();
        }
    </script>
Is it possible to create fields on a report?  In SQL I was able to do this fairly easily.  

An example would be:

Item ----  Qty ---- price --- total (qty*price)

Do I always need to have total on the object or can I create a non-grouped-by report and have a calculated field?
 
Is it possible to execute a trigger on a field by itself instead of an object?  

ObjectA.Field1  on update of Field1 run trigger.  On update of ObjectA.Field2 do nothing.
So I have an Apex method running off the process builder but when I try to update a record via the invoked method it says the record is locked. Perhaps the reason it won’t update is because the process hasn’t completed yet? How can I update a record via Apex triggered from the process builder?
 
@invocablemethod
public static void updateBenefit(list<ea_app__c> app){
                app[0].Benefit_Amount__c = calcBenefit(app[0].name);
    // ----> this is the issue here  <----
    update app;
}

public static decimal calcBenefit(string appID){
    decimal benefit = 0.0;
    integer coeff = getCoefficient('2015');
    decimal max = getMax(getfamilySize(appID));
    benefit = (1-(getIncome(appID)/max))*(getFuelCost(appID)/coeff);
    return benefit;        
}

 
Hi, 

I'm creating a visual force page that shows a new default list filter to override the standard page of a custom object.  How can I get the "NEW" button such that I can open a new form to create a new record.

<apex:commandLink action="{!URLFOR($Action.Fiscal_Year__c.NewFiscal_Year__c)}" value="Create New Fiscal Year"/>
         <apex:commandButton action="{! new}" value="create new fiscal year"/>

It seems creating a controller would be overkill because I simply want to go to the add fiscal year form vs adding one directly from this form.  Any ideas? 
Is it possible to edit muliple objects on 1 page layout.  I have a relational set of objects but it appears that a user can only edit one object at a time.    Should I be using Visualforce instead to achieve this?
I'm new to the platform so I'm trying to figure out how data entry forms should be designed.

Thanks,
Joe
Is there any other difference between master detail and lookup relationships outside of ownership behavior, security implications, and referential integrity between the objects?

Thanks,
Joe
So I keep getting the error:  The process did not set the correct Type value when approval outcome is Approved

see my attached setup.  

1) I added the options to the type account object
2) have the logic set on teh approval
3) have the field update options set to Pending for Intial, Customer for approval, Prospect for Rejections

Any ideas?User-added image
Why does this result in duplicate values for a single owner change event?
select Id, CreatedDate, Field, LeadId, NewValue, OldValue 
from LeadHistory
where (field = 'ownerAssignment' or field = 'Owner')
The lead history object has one record where the newvalue/oldvalue is the actual owner/ namequeue name, and then a duplicate record with the exact same CreatedDate time stamp that shows newvalue/oldvalue as the owner id/queue id.

What is going on here?  Why does lead history have 2 records for the exact same event?

User-added image
  • September 04, 2015
  • Like
  • 2