• Lisa Seiler
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 10
    Replies
Hi @all,
I hope someone can help me. I want to create a case ans assign a Id to a relationship.
In error I get -> StringException: Invalid id: 0013E00000iMZjNQAW
I convert a String to a Id with this code:
c.AccountId = Id.valueOf(newCatererId);
At this point I got the error.
newCatererId is a String with the Id.
I havre tried to convert it before I assign it to AccountId. It does not working too.

I hope someone can help me
Lisa
 
Hi everyone,
I have a problem with merge/realation field in my template.
I want to add this to get the company name:
{!Order__c.PersonAccountId__c.Company__c}

But it is not working.
{!Order__c.PersonAccountId__c} is working fine and the name of the account appears.

All are only lookups and no master detail and PersonAccountId__ reffered to a simple Account object

 I have tried it with following too:
{!Order__r.PersonAccountId__r.Company__c}
{!Order__c.PersonAccountId__r.Company__c}
{!Order__r.PersonAccountId__c.Company__c}
It is not working.

Is someone able to help me?

Best
Lisa
Hi @ all,
I have a Visualforce Page to show all orders from an event related to one account (account.Id). In a table:
<apex:pageBlockTable style="=flex-item, table" var="orders" value="{!allOrders}">


!allOrders are all orders from the related event, for example here one column:
<apex:column headerValue="ORDER ID" value="{!orders.Id}" />


It is working perfect. In every row is the id, price and a description for one related child object from the event (ord more if they are more ;) )

I have a extension to do something.
On the page I have a form and a commandLink because I need to catch every single order.Id and account.Id. I get it with param and on my class with Apexpages.currentPage.....:
Page:
<apex:param name="orderIdValue" value="{!orders.Id}"/>


Class:
relatedOrderId = Apexpages.currentPage().getParameters().get('orderIdValue');


It is working perfect.
Now I have a inputField that allows to do some corrections from the account's side...
I need to save the new value and work with them on my "action-method" "save". But I can not transfer the new input by a user from the visualforce page to my extension/class.
I tried it with:
  • get;set; -> not working
  • apex:param -> not working
  • a new variable + inputText -> not working

It is only working if I use a new value on my class ->
public String input {get; set;}


And this one on my page:
<apex:inputText value="{!input}" id="theInput" />


But if I have more than one record, I have to fill in all fields and only the last value is remembered. So If I want to save for example 2 values, 1. = 1 and the 2. is 5, only 5 is saved.

I hope somecone can help me, I need to change values from every single record.

Best
Lisa


 
Hi @ all,
I want to create inputFields to save new values to a "Order".
First the structure. I have a Event with some Orders and the Order can have Order Items. All are in master-detail.
I have a VF-Page with a extension and standardController is Event.. In a table I call all Order Items related to one Event. This is no problem. My problem is, the field I want to fill is on the Order. I catch the field in my method and write it down to the page. But the page shows not the inputField...it shows only the value so I cannot save new values(there is no field to write something)....is someone understand me and able to help me?
Following are my code-snippets:
This is my VF-Page. If I get a inputField from the Event it is working perfectly...If I get the Order fields....it is not working:
<apex:column headerValue="Korrektur Preis Netto"><apex:inputField html-placeholder="Preis Netto" type="auto" value="{!o.Order__r.New_Net_Total__c}" /></apex:column> />
                    <apex:column headerValue="Anzahl an Gästen" value="{!o.Order__r.Number_of_Guests__c}"/>
                    <apex:column headerValue="Korrektur Anzahl der Gäste"><apex:inputField html-placeholder="Anzahl an Gästen" type="number" value="{!o.Order__r.New_Number_of_Guests__c}" /></apex:column> />

This is the related extension-class:
public List<Order_Item__c> getorderItems(){
        List<Order_Item__c> currentOrderItems = new List<Order_Item__c>();
        List<Order_Item__c> returnOrderItems = new List<Order_Item__c>();
        String orderItems;
        currentOrderItems = [SELECT Id, Order__c, Order__r.New_Number_of_Guests__c, Order__r.New_Net_Total__c, Caterer__r.Name, Net_Price__c, MenuId__r.Name, Category__c, Order__r.Number_of_Guests__c FROM Order_Item__c WHERE (Order__r.Event__c =: event.Id) AND (Caterer__c =: catererid)];
        for(Order_Item__c oi : currentOrderItems){
            if(oi.Category__c == 'Menu'){
                returnOrderItems.add(oi);
            }
        }
        return returnOrderItems;
    }
Here screenshot form both sides:
Event inputField
event input field
order inpoutField
order input field

Best,
Lisa
 
Hi @ all,
I defined a new custom PersonAccount matching Rule. Here are a screenshot:
User-added image
I don't know why is it not working. If i create a new PersonAccount with a duplicate email it is not fired.
Can someone help me?
At "Matching Criteria" I tried AND and OR, both not working. I need OR.

Best,
Lisa
 
Hi @ all,
 I have a visualforce page with the standardController to a custom object.
I want to get all orders (Orders__c) from a event (Event__c). I started by the offer (Offer__c)
Offer is in master-detail with the event and the event is in master-detail with the orders.
I have tried two following codes:
<apex:page standardController="Caterer_Offer__c" sidebar="false" showHeader="false" >
    <apex:repeat var="events" value="{!Caterer_Offer__c.Event__r}">
        {!events.Name}
        <apex:repeat var="orders" value="{!events.Orders__r}">
            <!-- {!orders.Name}-->
        </apex:repeat>
    </apex:repeat>
</apex:page>
At this the error-message in the developer console is:

"Aggregate Relationship is used in an unsupported complex expression containing 'Event__r.orders__r'"

And...then I have trief to save the event and use a new variable to "repeat" all orders. I get no error message, but a error in Salesforce
<apex:page standardController="Caterer_Offer__c" sidebar="false" showHeader="false" >
    <apex:repeat var="events" value="{!Caterer_Offer__c.Event__r}">
        {!events.Name}
        <apex:variable var="e" value="{!events}"/>
        <apex:repeat var="orders" value="{!e.Orders__r}">
            <!-- {!orders.Name}-->
        </apex:repeat>
    </apex:repeat>
</apex:page>
Error-message:
SObject row was retrieved via SOQL without querying the requested field: Event__c.Orders__r
Is someone able to help me?
I cannot explain it and work on it since a few hours....

Thank you and best,
Lisa
Hi @ all,
I have a visuaforce page. I want to summarize some currency fields. I summarize the values at the end of <apex:repeat> It works perfectly, but if one number is 0€ it is not working. The result is 0€ always.
Here is a example:
<c:NumberComponent componentValue="{!qli.Subtotal-qli.Product_Discount__c}"/>
At this case "Product_Discount__c" is 0€. The result have to be "Subtotal" (is it always filled with a currency), but the result is 0 €.
The same case if I want so summarize all "Product Discounts" at the end of my table.
<apex:variable var="SumDiscount" value="{!SumDiscount+qli.Product_Discount__c}" />

If one currency is 0€ the result is always 0€ although one other curreny is filled always!
I hope someone can help me.

Best,
Lisa
(Sorry for the bad english)
 
Hi @ All,
I have found this post:
https://developer.salesforce.com/forums/?id=906F000000096RJIAY

So, I want to try sum all "Quote Line Items" at my Visualforce Page.
I catch all items with "repeat" and have to try sum all items with the link below. I get following error-message:
Error: Incorrect parameter type for function 'not()'. Expected Boolean, received Number
I found no way to understand it....
My code at the visualforce-page look like this:
<apex:variable var="Sum" value="{!0}" />
    <apex:repeat var="qli" value="{!QuoteLineItems}">
        ....
    <apex:variable var="Sum" value="{!Sum+!qli.Quantity}" />
</apex:repeat>

"Quantity" is the default-number-field from Quote.
Is someone able to help me?

Best,
Lisa
(Sorry for the bad english ;-) )

 
Hi @ all,
i have a Account with a relationship. The object is "Menu". Menu have "Master-Detail" to Account. One more object is "Menu item" This object have a "Master-Detail" to "Menu". Now I want to add the Liste of "Menu" at the Account Layout. This work without any problems. Now I want to add the "Menu Item" list in the list to "Menu" at the page layout from account.  The result should be that I can see all info at the account page to the menu and related menu items. Is this possible?

(I hope it is understandable, my english is not very good ;) )

Thanks,
​Lisa
Hi @ all,
i have a workflow and want to add a field update. This need a formula. I want to assign new values to a object and they depend on a number.
Like this:
 
CASE(IF(ISPICKVAL(Terms_of_Payment__c, '14'),1,0),
 ZTERM__c = '0017', NULL
)

If Terms_of_Payment__c(picklist) is "14" I want to assign "0017" to the field "ZTERM__c"(text) but it doesnt work. I get the error:
Error: Incorrect number of parameters for function 'CASE()'. Expected 4, received 3

I want to add more "cases" to the function, but this was the first try.

Can someone help me?
 
Hi at all,
I have 2 workflows.
here is the first:
User-added image

This is the second:
User-added image

The target is that a status is set after a few days to the account. This is because I need a time trigger on the second workflow. The status should be set if this is the "last order" from the account (~30 days).
But if the workflows start, he change the fields but at the end the time trigger is lost -> doesnt work.

I think it will be delete because he change the checkbox field to false and the criteria doesnt match...so the time trigger is not started...can someone help me to start the time trigger and to keep it?

Thanks,
Lisa
Hi at all,
I want to set a time trigger on a workflow.
But I have a problem. I don't can add a time trigger to the evaluation criteria :"created, and every time it's edited" but I need to add it.
I can use "created, and any time it's edited to subsequently meet criteria" but there i can not use in the rule criteria the formula "ISCHANGED" but I have to need ist. It is a date/time field and he have to check the field and set a time tigger on that date and evaluate after 30 days.
If I use ISCHANGED to "created, and any time it's edited to subsequently meet criteria" I get a error message:
"Error: Function ISCHANGED may not be used in this type of formula"

I hope someone can help me.

Thanks,
Lisa
(sorry for the bad english)
 
Hi @ all,
i tried to use the MIN function in the process builder with a auto number. But he tell me that he is expecting a number but received a text. Can someone help me?

Lisa
Hi @ all,
I want to compare a date field and a datetime field in the process manager. Is this possible?

Lisa
Hi at all,
i have a problem with the process builder.
I have a process for a "Order Item".
If i want to add a "Order Item" i have to set some fields. There are:
  • Order
  • Caterer
  • Menu
  • Quantity
  • Net Price
  • Description

Only "Order" is a compulsory field.
I want to add a "Order Item" without anything, so only the "Order" field is filled. But if I fill not the "Menu" field, i get a problem and a "Error Oncurred During Flow" mail send to me:
"An error occurred at element myDecision (FlowDecision).
The flow failed to access the value for SObject.MenuId__r.Name because it hasn't been set or assigned."

In my process I decide between:
  1. "Menu" is null false
  2. "Menu" is null true
If its true (1.) he is going on, if its false, he should do nothing.
This is the place he send ma a error!

Can someone help me?
It should be possible to add an object without any informations. If the "caterer field" is emtpy, this work without problems..but who is the problem with the "Menu Name" field?

Sorry for the bad english ;)

Lisa

 
Hi @ all,
I defined a new custom PersonAccount matching Rule. Here are a screenshot:
User-added image
I don't know why is it not working. If i create a new PersonAccount with a duplicate email it is not fired.
Can someone help me?
At "Matching Criteria" I tried AND and OR, both not working. I need OR.

Best,
Lisa
 
Hi All

I'm trying to check a checkbox based on a picklist field value and vice versa, I'm using a VF page with a Standard controller and an extension and some Java Script, I'm relatively new to this so please bear with me. I think I'm heading in the right direction but messing up somewhere along the way.

Please see the code snippets below and advise where I'm going wrong/how can I achieve this? The Quality_Issue__c is the picklist and Quality_Reporting_Only__c is the checkbox that needs to be checked.
Extension class
public class ClientSupportController {
    public Case ClientSupportCase {get;set;}
    public User UserID {get;set;}
    public ApexPages.StandardController controller{get;set;}
    
    
    public ClientSupportController(ApexPages.StandardController controller) {
    
        ClientSupportCase = new Case();
        this.controller = controller; 
}

public PageReference saveClientSupportCase () {
        
        try{upsert (ClientSupportCase);
            
           } catch (System.DmlException e) {
               ApexPages.addMessages(e);
               return null;
           }
        PageReference redirectSuccess = new ApexPages.StandardController(ClientSupportCase).view();
        return (redirectSuccess);
        
    }
    
    public void QualityCheckboxSelction () {
        
        System.debug('>>>>>>>>>');
        if (ClientSupportCase != null) {
            System.debug('ClientSupportCase.QualityIssue >>>>>>>>> ' + ClientSupportCase.Quality_Issue__c);
            if(ClientSupportCase.Quality_Issue__c == 'Yes') {
                ClientSupportCase.Quality_Reporting_Only__c = true ;
            } else if (ClientSupportCase.Quality_Issue__c == 'None') {
                ClientSupportCase.Quality_Reporting_Only__c = false ;
            }
        }
        
    }

}
VF Page :
<apex:page standardController="Case" extensions="ClientSupportController" showHeader="true" sidebar="true" tabStyle="Case"  title="New Case"  >
    
    
    <script type="text/javascript">
    function selectionActionQualityCheckbox(valueCheckQualityReporting) {
                
                if(valueCheckQualityReporting == false) {
                    callMethodQualityCheckbox();
                }
            }
    </script>

<apex:form >
     <apex:pageBlock title="Case Edit" >
      <apex:pageBlockButtons >
      
    <apex:commandButton value="Save" action="{!saveClientSupportCase}" />
                <apex:commandButton value="Cancel"/>
      </apex:pageBlockButtons>
         
      <apex:actionfunction name="callMethodQualityCheckbox" action="{!QualityCheckboxSelction}" reRender="id_SectionSnapshot">  
      </apex:actionFunction>
         
      <apex:actionfunction name="callMethodQualityCheckbox" action="{!QualityCheckboxSelction}"  reRender="IncidentManagement">  
      </apex:actionFunction>   

      <apex:pageBlockSection title="Case Snapshot" id="id_SectionSnapshot">
                <apex:pageblocksectionitem >
                    <apex:outputLabel value="Case Record Type" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:outputField value="{!ClientSupportCase.RecordTypeid}"  />
                </apex:pageblocksectionitem>        
          
                <apex:pageblocksectionitem >
                    <apex:outputLabel value="Case Owner" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.ownerid}" />
                </apex:pageblocksectionitem>
          
                <apex:pageblocksectionitem >
                    <apex:outputLabel value="Status" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.Status}"  />
                </apex:pageblocksectionitem>
                
                <apex:pageblocksectionitem >
                    <apex:outputLabel value="Quality Issue" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.Quality_Issue__c}" onchange="selectionActionQualityCheckbox(this.value)" id="shiva1"/>
                </apex:pageblocksectionitem>
</apex:pageBlockSection> 
          
                
<apex:pageBlockSection title="Incident Management" id="IncidentManagement">
          
                <apex:pageblocksectionitem >   
                    <apex:outputLabel value="Impact" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.Impact__c}"/>
                </apex:pageblocksectionitem>
          
                <apex:pageblocksectionitem >
                    <apex:outputPanel >
                    <apex:outputLabel value="Quality Reporting - No Assistance Needed" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.Quality_Reporting_Only__c}" onchange="selectionActionQualityCheckbox(this.value)"/>
                </apex:outputPanel>
                    </apex:pageblocksectionitem>
</apex:pageBlockSection>


 
Hi @ All,
I have found this post:
https://developer.salesforce.com/forums/?id=906F000000096RJIAY

So, I want to try sum all "Quote Line Items" at my Visualforce Page.
I catch all items with "repeat" and have to try sum all items with the link below. I get following error-message:
Error: Incorrect parameter type for function 'not()'. Expected Boolean, received Number
I found no way to understand it....
My code at the visualforce-page look like this:
<apex:variable var="Sum" value="{!0}" />
    <apex:repeat var="qli" value="{!QuoteLineItems}">
        ....
    <apex:variable var="Sum" value="{!Sum+!qli.Quantity}" />
</apex:repeat>

"Quantity" is the default-number-field from Quote.
Is someone able to help me?

Best,
Lisa
(Sorry for the bad english ;-) )

 
Hi @ all,
i have a workflow and want to add a field update. This need a formula. I want to assign new values to a object and they depend on a number.
Like this:
 
CASE(IF(ISPICKVAL(Terms_of_Payment__c, '14'),1,0),
 ZTERM__c = '0017', NULL
)

If Terms_of_Payment__c(picklist) is "14" I want to assign "0017" to the field "ZTERM__c"(text) but it doesnt work. I get the error:
Error: Incorrect number of parameters for function 'CASE()'. Expected 4, received 3

I want to add more "cases" to the function, but this was the first try.

Can someone help me?
 
Hi @ all,
i tried to use the MIN function in the process builder with a auto number. But he tell me that he is expecting a number but received a text. Can someone help me?

Lisa
Hi @ all,
I want to compare a date field and a datetime field in the process manager. Is this possible?

Lisa
Hi at all,
i have a problem with the process builder.
I have a process for a "Order Item".
If i want to add a "Order Item" i have to set some fields. There are:
  • Order
  • Caterer
  • Menu
  • Quantity
  • Net Price
  • Description

Only "Order" is a compulsory field.
I want to add a "Order Item" without anything, so only the "Order" field is filled. But if I fill not the "Menu" field, i get a problem and a "Error Oncurred During Flow" mail send to me:
"An error occurred at element myDecision (FlowDecision).
The flow failed to access the value for SObject.MenuId__r.Name because it hasn't been set or assigned."

In my process I decide between:
  1. "Menu" is null false
  2. "Menu" is null true
If its true (1.) he is going on, if its false, he should do nothing.
This is the place he send ma a error!

Can someone help me?
It should be possible to add an object without any informations. If the "caterer field" is emtpy, this work without problems..but who is the problem with the "Menu Name" field?

Sorry for the bad english ;)

Lisa