• A_Li_N
  • NEWBIE
  • 25 Points
  • Member since 2010

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

We have a custom object NRProducts__c that is made up of all of our products. We want to be able to import a file update (via import wizard) to update inventory levels. The import file will not be based on the Name record, but rather an external number (Model_Number__c). Our goal is that if a new Model_Number exist in the import file that a new record is inserted with the default name "NEWPRODUCT". Below is the trigger that was created, but when we run an import with a new Model Number and Name as null/blank we get an email saying the record already exist (see below)

trigger ProductTrigger on NRProducts__c (before update, before insert) {
for(NRProducts__c r : Trigger.new){
if(r.Name == null && r.Name.length() <= 0){
r.Name = 'NEWPRODUCT';
}
}
}


Email from SF-
Force.com Sandbox

Alert: All information in the import file was already in salesforce.com.

Result: No data was created or modified in salesforce.com.

If you encounter any problems or have any questions, please contact us by clicking Help & Training at the top right of any salesforce.com page and choosing the My Cases tab.

Thank you!

Customer Support
salesforce.com


Any ideas how to make this work?

  • April 12, 2011
  • Like
  • 0

I was wondering how to go about grabbing all data from an entire object tree:
Patient -> Test -> TestResult
Each step is a Master/Detail to the previous and I want to be able to get a patient and have it populate all of its tests as well as each tests' results.  

I am aware that SOQL only allows a single parent-child selection and am just wondering how to go about getting grandchildren populated.

 

Thank you for any help!

We have a custom object NRProducts__c that is made up of all of our products. We want to be able to import a file update (via import wizard) to update inventory levels. The import file will not be based on the Name record, but rather an external number (Model_Number__c). Our goal is that if a new Model_Number exist in the import file that a new record is inserted with the default name "NEWPRODUCT". Below is the trigger that was created, but when we run an import with a new Model Number and Name as null/blank we get an email saying the record already exist (see below)

trigger ProductTrigger on NRProducts__c (before update, before insert) {
for(NRProducts__c r : Trigger.new){
if(r.Name == null && r.Name.length() <= 0){
r.Name = 'NEWPRODUCT';
}
}
}


Email from SF-
Force.com Sandbox

Alert: All information in the import file was already in salesforce.com.

Result: No data was created or modified in salesforce.com.

If you encounter any problems or have any questions, please contact us by clicking Help & Training at the top right of any salesforce.com page and choosing the My Cases tab.

Thank you!

Customer Support
salesforce.com


Any ideas how to make this work?

  • April 12, 2011
  • Like
  • 0

Hi All,

 

I am using CMSForce to build content of one of my current sites and am also using a URL rewriting class. The issue I am having is when using the submit button on a webform page, or calling any pagereference method, the URL rewriter class is called first and the method to save the form never gets executed. Has anyone run into similar issues using URL rewriter, and if so - have you found any workarounds? I appreciate any help with this!

So I never thought I would be hitting this limit but here I am. I did a search on this and nothing came up so it looks like I'm one of the few to hit this limit.

Maximum view state size limit (128K) exceeded. Actual viewstate size for this page was 174.281K.

Hmm. So what can I do to measure this and control it. Is there any field I can output to monitor what my viewstate while developing?

Thanks,
Jason




Message Edited by TehNrd on 08-26-2008 03:03 PM
  • August 26, 2008
  • Like
  • 0

Hi all,

Does anyone know a way to cut down the size of the viewstate that gets posted to and from the server?  We are finding very noticeable performance hits when we do AJAX postbacks (or any kind of postback really).  We have done some investigation and have noticed the viewstate is very large for what we are actually rendering to the browser.  For example:

<apex:page>

           <apex:form>

            </apex:form>

</apex:page>

ViewState size = 1772 bytes

<apex:page standardController="Case">

            <apex:form>

                  <table>

                        <tr><th>Head</th></tr>

                        <tr><td>Content</td></tr>

                  </table>

                  <c:TestComponent />

            </apex:form>

            <apex:outputField value="{!Case.Contact.Name}" />

            <apex:outputPanel />

            <apex:outputText value="Test" />

</apex:page>

<apex:component>

      <table>

            <tr><td>Content In Component</td></tr>

      </table>

</apex:component>

ViewState size = 3756 bytes

As you can see these are simple examples that we have slowly built out to monitor the increase in viewstate.  Naturally as our pages get more complex the viewstate gets excessively large, slowing down the round trip to the SF servers.

Therefore, the questions I have are:

Can we configure the viewstate for each component like ASP.Net allows (or for the entire page)?


Cheers