• Sucreem
  • NEWBIE
  • 0 Points
  • Member since 2012
  • Business Apps Manager
  • ExtraHop

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
I'm trying to build a VF page using parts from an unmanaged package I found on the AppExchange (https://appexchange.salesforce.com/listingDetail?listingId=a0N30000009wrXXEAY) but I can't resolve a "Syntax Error" I'm getting on line 1 of this code.  I hoping it's something I'm missing in the code.  If not, could it be a syntax error in the static resources?

<apex:page >
<!-- Include the JS files -->

    <apex:includeScript value="{!URLFOR(IWLResources, ‘/javascript/IWLjQueryLib.js’)}"/>
    <apex:includeScript value="{!URLFOR(IWLResources, ‘/javascript/IWLCommons.js’)}"/>
    <apex:includeScript value="{!URLFOR(IWLResources, ‘/javascript/IWLListview.js’)}"/>
   
<!-- Include all default CSS files for listview -->
   
    <apex:stylesheet value="{!URLFOR(IWLResources, ‘/styles/IWLCommonsDefault.css’)}"/>
    <apex:stylesheet value="{!URLFOR(IWLResources, ‘/styles/cssreset-context-min.css’)}"/>
    <apex:stylesheet value="{!URLFOR(IWLResources, ‘/styles/IWLListviewDefault.css’)}"/>
   
<!-- The next sentence includes the widget in your page-->
   
<c:IWLListviewWidgetView DeveloperName="SampleList" />

</apex:page>

I've tried a few variations and can't seem to get it right.

 

I need to pass a date from a custom object (Appliance__c) to a standard object (Entitlement).  There is a lookup field to the custom object from the entitlement object.

 

Date on the appliance is called "Latest_Check_In_Date__c" and the date on the Entitlement is called "first_check_in_date__c"

 

Any help would be greatly appreciated.

 

Here is the code I have so far which results in an error: Error:Apex trigger EvalFirstCheckIn caused an unexpected exception, contact your administrator: EvalFirstCheckIn: execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: []: Trigger.EvalFirstCheckIn: line 16, column 1

 

trigger EvalFirstCheckIn on Appliance__c (before update, after insert) {

List<Id> Ids = new List<Id>();

    for(Appliance__c App : Trigger.new)
    {
        Ids.add(app.id);
    }

List<Appliance__c> applist = new List<Appliance__c>([Select Id, latest_check_in_date__c FROM Appliance__c WHERE Id in :Ids]);

    for(Appliance__c temp : applist )
    {
        Entitlement ent = new Entitlement();
        ent.first_check_in_Date__c = temp.Latest_Check_In_Date__c;
        update ent;
    }

}

 

I'm trying to build a VF page using parts from an unmanaged package I found on the AppExchange (https://appexchange.salesforce.com/listingDetail?listingId=a0N30000009wrXXEAY) but I can't resolve a "Syntax Error" I'm getting on line 1 of this code.  I hoping it's something I'm missing in the code.  If not, could it be a syntax error in the static resources?

<apex:page >
<!-- Include the JS files -->

    <apex:includeScript value="{!URLFOR(IWLResources, ‘/javascript/IWLjQueryLib.js’)}"/>
    <apex:includeScript value="{!URLFOR(IWLResources, ‘/javascript/IWLCommons.js’)}"/>
    <apex:includeScript value="{!URLFOR(IWLResources, ‘/javascript/IWLListview.js’)}"/>
   
<!-- Include all default CSS files for listview -->
   
    <apex:stylesheet value="{!URLFOR(IWLResources, ‘/styles/IWLCommonsDefault.css’)}"/>
    <apex:stylesheet value="{!URLFOR(IWLResources, ‘/styles/cssreset-context-min.css’)}"/>
    <apex:stylesheet value="{!URLFOR(IWLResources, ‘/styles/IWLListviewDefault.css’)}"/>
   
<!-- The next sentence includes the widget in your page-->
   
<c:IWLListviewWidgetView DeveloperName="SampleList" />

</apex:page>

I've tried a few variations and can't seem to get it right.

 

I need to pass a date from a custom object (Appliance__c) to a standard object (Entitlement).  There is a lookup field to the custom object from the entitlement object.

 

Date on the appliance is called "Latest_Check_In_Date__c" and the date on the Entitlement is called "first_check_in_date__c"

 

Any help would be greatly appreciated.

 

Here is the code I have so far which results in an error: Error:Apex trigger EvalFirstCheckIn caused an unexpected exception, contact your administrator: EvalFirstCheckIn: execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: []: Trigger.EvalFirstCheckIn: line 16, column 1

 

trigger EvalFirstCheckIn on Appliance__c (before update, after insert) {

List<Id> Ids = new List<Id>();

    for(Appliance__c App : Trigger.new)
    {
        Ids.add(app.id);
    }

List<Appliance__c> applist = new List<Appliance__c>([Select Id, latest_check_in_date__c FROM Appliance__c WHERE Id in :Ids]);

    for(Appliance__c temp : applist )
    {
        Entitlement ent = new Entitlement();
        ent.first_check_in_Date__c = temp.Latest_Check_In_Date__c;
        update ent;
    }

}

 

HI,

 

I would like to find out how I could make a flow end at a custom location, more specifically make it end at the place where it was started/clicked, which is a VF page within a button on a record detail page.

 

Here is the VF page that I've created, I only need it to end at the Contact Id page where it was clicked (the flow already has a variable with the Contact Id called ContactID.

 

All help is much appreciatted!

 

<apex:page standardController="Account" tabStyle="Account">

    <flow:interview name="Flow_Testing" finishLocation="{!URLFOR('/003/o')}">
        <apex:param name="AccountID" value="{!account.Id}"/>
        <apex:param name="UserID" value="{!$User.Id}"/>
    </flow:interview>
    
</apex:page>
For example if you are using a visual flow to do some data maintenance task - e.g. updating contact details.


You want to ask the user to update fields like the Department, but you want to default the choice to display the existing value from the contact record.

At the moment you can only default it to a static choice.  I would like to be able to default it to the value of a lookup variable, so that the user can see the department is currently 'Sales' or whatever.

(The workaround I have found so far is to have n versions of the screen - with each one having the department defaulting to one of the n possible values - i.e. one for 'Sales', one for 'Finance', etc.  and a decision step to decide which screen to show. This is 'ok' for a small number of choices, but un-manageable for picklists with more than a few options)

 

(NB - this is a copy of an Idea that I created earlier https://sites.secure.force.com/success/ideaView?id=08730000000ihzjAAA)

Is there a way to get a dynamic choice to show ALL values that are possible in a picklist without having to have a record with each value or manually creating each choice every time a new picklist value is added?

 

CASE:

1) Flow_Picklist__c: Values= Good, Bad, Ugly

2) 1 Record with the Flow Picklist filled in with Good.

3) The Dynamic Choice only brings back Good, not bad and/or ugly.

4) I create each of those three picklist values as an individual choice.

5) I add a value to the picklist field

6) that value does not show up in the dynamic choice so I have to manually make that value a choice.

7) repeat steps 5 and 6 over and over again.

 

Is there a way to not have to do steps 4-7 and make step 3 add all choices?

  • June 19, 2012
  • Like
  • 0