• cloudgofer
  • NEWBIE
  • 75 Points
  • Member since 2010

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 29
    Replies

I'm using a dummy Visualforce page with an action on the apex:page to allow me to connect a custom button with exectuting some Apex code. Everything works fine, as per the many examples.

 

Here's the page:

 

<apex:page standardController="Opportunity" extensions="CloneOppButtonController"  action="{!autoRun}">
  <apex:sectionHeader title="Auto-Running Apex Code"/>
  <apex:outputPanel >
      You tried calling Apex Code from a button.  If you see this page, something went wrong.  You should have
      been redirected back to the record you clicked the button from.
  </apex:outputPanel>
</apex:page>

 Here's the relevant bits of the extension controller:

 

ublic with sharing class CloneOppButtonController {

	private final ApexPages.StandardController theController;

	public CloneOppButtonController(ApexPages.StandardController stdController) {
		theController = stdController;
	}

	public PageReference autoRun() {
		Id cloneId;	

		// Call the Apex Method we want to invoke and then show the new page
		try {
			cloneId = CloneOpportunity.cloneWithProducts(theController.getId());
		}
		catch (Exception e) {
			theController.getRecord().addError('Opportunity could not be cloned, check debug log for errors');
		}

		// New page is id of the cloned object if it worked, or previous page otherwise
		if (cloneId == null) cloneId = theController.getId();
		
		return new PageReference('/' + cloneId);
	}

 However, when a user clicks their browser Back button the dummy page is the previous page in the browser history and so it executes again - and creates another clone of the opportunity. As the destination page is a standard Salesforce page, there's little I can do on that - I can't guarantee control over the page layout as this is part of a package being developed.

 

 

 

I've seen on other forums about trying to use javascript to manipulate the browser history but this doesn't seem to fire before the action method.

 

Any other solutions ?

 

  • November 17, 2010
  • Like
  • 0

I understand that the Translation Workbench allows for the values in a pick list to be converted to an other langauge. What is the impact on SOQL queries that use he value of a picklist in its WHERE clause

 

Will 

select name from account where type = 'prospect'

Still work if the picklist is localised to say German or does the SOQl statement need to be changed to

select name from account where type = 'aussicht'

 

I've spent a few hours building part of the Warehouse tutorial app. 

How do I 'run' it? Where is it?

I can add its tabs but where is the app itself?

I know that I saw it running, at some point, while I was working on the tutorial but how do I get back to it?

Thank you...

  • October 27, 2010
  • Like
  • 0
Salesforce Console Related question:

Below screen shot is from developer org having no record types for Case. Email action is available in Dev org but it is not available in client's org where there are multiple record types for Case. The guide for action implementaton refers to issue with record type but there are no screen shots explaining how to assign quick action to a record type.

http://resources.docs.salesforce.com/200/18/en-us/sfdc/pdf/actions_impl_guide.pdf 
see page 24: QUICK ACTIONS AND RECORD TYPES

Not sure what does below means ?
Important: Don’t assign actions to the Master record type. The Master record type is a placeholder record type that’s assigned when your organization is created

User-added image

fellow developers,

here is a custom search engine built for you , please test drive and let me know your feedback via feedback button on the site.

www.cloudgofer.com , also feel free to send in request to add more salesforce specific sites to the custom search engine.

 

No more going through different manuals or guides to lookup a syntax for tag or an API.

Hello everyone.

 

Is it possible to create a permission set based on the Guest User License?

 

I have a managed package solution and want to define a permission set that the subscribing ORG's admin can then assign to the Force.com Site Guest User as an assignable permission set.

 

Is this even possible?  If so, how would I go about doing this?

 

As always, I appreciate the help.

 

Cheers!

 

John

I'm using a dummy Visualforce page with an action on the apex:page to allow me to connect a custom button with exectuting some Apex code. Everything works fine, as per the many examples.

 

Here's the page:

 

<apex:page standardController="Opportunity" extensions="CloneOppButtonController"  action="{!autoRun}">
  <apex:sectionHeader title="Auto-Running Apex Code"/>
  <apex:outputPanel >
      You tried calling Apex Code from a button.  If you see this page, something went wrong.  You should have
      been redirected back to the record you clicked the button from.
  </apex:outputPanel>
</apex:page>

 Here's the relevant bits of the extension controller:

 

ublic with sharing class CloneOppButtonController {

	private final ApexPages.StandardController theController;

	public CloneOppButtonController(ApexPages.StandardController stdController) {
		theController = stdController;
	}

	public PageReference autoRun() {
		Id cloneId;	

		// Call the Apex Method we want to invoke and then show the new page
		try {
			cloneId = CloneOpportunity.cloneWithProducts(theController.getId());
		}
		catch (Exception e) {
			theController.getRecord().addError('Opportunity could not be cloned, check debug log for errors');
		}

		// New page is id of the cloned object if it worked, or previous page otherwise
		if (cloneId == null) cloneId = theController.getId();
		
		return new PageReference('/' + cloneId);
	}

 However, when a user clicks their browser Back button the dummy page is the previous page in the browser history and so it executes again - and creates another clone of the opportunity. As the destination page is a standard Salesforce page, there's little I can do on that - I can't guarantee control over the page layout as this is part of a package being developed.

 

 

 

I've seen on other forums about trying to use javascript to manipulate the browser history but this doesn't seem to fire before the action method.

 

Any other solutions ?

 

  • November 17, 2010
  • Like
  • 0

Hi all,

Anybody please tell me how do I add local images /snapshots to post ?

Is there anything I am missing :::::

 

Thanks,

Bala

System.AsyncException: Database.executeBatch cannot be called from a batch or future method.

 

 

Hi all,

 

I'm new in Salesforce. I try to select multiple values, for example we select Users, from the lookup search button. It can only select one User in each field. If we want to get two Users in one field, how to use to lookup search? What and where should I make up configurations?

 

 

 

Thanks a lot.

  • November 16, 2010
  • Like
  • 0

Hi,

 

we are currently a bit stuck at referencing the correct data that fit our needs.

 

Currently we are rendering a new line in calendar for any Rental Period in the database. The Rental Period contains a relationship to another custom object, which holds the product the customer has rented.

 

Right now, a new line is rendered for every Rental Period, regardless of periods that have the same product.

 

We would like to be able to do a subselect query to get every period start date for every product.

The subselect currently looks like this:

 

Select (Select Start__c, End__c From Rental_System__r) From Rental_Systems__c

 

From this subselect, we need to access specific fields.

I tried accessing Start__c on the VIsualforce page and in the Apex controller as you would do it for a 'normal' select query but that was not very successfull ;)

Is it in any way possible to directly access the values in the query?

 

Regards,

hoomel

 

  • November 16, 2010
  • Like
  • 0

I understand that the Translation Workbench allows for the values in a pick list to be converted to an other langauge. What is the impact on SOQL queries that use he value of a picklist in its WHERE clause

 

Will 

select name from account where type = 'prospect'

Still work if the picklist is localised to say German or does the SOQl statement need to be changed to

select name from account where type = 'aussicht'

 

Hey all, this might be a really simple question or it might not.

 

I have a Custom Record that will have multiple Accounts associated with it.  Is there any way to have that Custom Record show up on all the Accounts' related lists? 

 

 

Hi.

 

I am experiencing the corruption of my JavaScript code when delivered through VisualForce. The code is embedded in my page rather than being held in a separate JS file.

 

The offending section of the original code looked something like this:

<apex:page showHeader="false" sidebar="false"> 
	<script type="text/javascript">
		function SMTInitCheckboxes() 	
		{
			for (var i=0;i<iMax;++i)

 

 

When this gets loaded into the browser I get a JavaScript error. Viewing the code in the browser shows that the text has been modified from my original source:

<script type="text/javascript">
  function SMTInitCheckboxes()  
  {
   for (var i=0;i<iMax className="SMTTRError" ;++i)

 

You can see that ‘className="SMTTRError"’ has magically appeared in the middle of the FOR statement. This is text from much further down the page. I assumed that I had a JavaScript bug and commented out the code but this did not fix the problem.

 

I systematically eliminated all of the VisualForce, HTML and JavaScript until I got the entire page content down to this:

<apex:page showHeader="false" sidebar="false">
<script type="text/javascript">
(i=0;i<iMax;i)
</script>
</apex:page>

The received HTML code (according to FireBug) is as follows. Notice the space between iMax and the semi-colon. The problem is still occurring but only the extra space is being added.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html><head></head><script type="text/javascript">
(i=0;i<iMax ;i)
</script></html>

 

 

I have done the following to try and eliminate the problem with no success:

  • Commented out the JavaScript.
  • Wrapped the JavaScript in CDATA sections.
  • Used different browsers (IE and FireFox).
  • Tried delivering the same content through IIS.

 

Can anyone suggest why my code is being corrupted? It looks like some kind of buffer error in the SFDC parser or page builder but I am hoping it is something that I have screwed up.

I hope to avoid having to move all of my JavaScript into separate JS files simply due to the large number of pages involved.

 

Thanks for your help.

Hi,

I am planning to write the certication for 201 and 401 exam.can anyone plz help me regarding the material needed for the exam.

 

Thanks,

Is there a way around using field level security to make fields not reportable, but still accessible on page layouts and formulas?

  • November 04, 2010
  • Like
  • 0

Hi All,

 

Long time no see.. :smileywink:

 

This time im back with one more query of mine which is holding me back. :smileysad:

 

I have been trying to host a modal window designed using CSS, and i have written a Search query in the code. When i click the Search button for the first time it doesnt throw and error, once i try to resue the search functionality, it throws the Error : An internal server error has occurred :smileysad:

  

My Code is as below :

 

<!--Start Div tag for company-->
<div id="modalPageCompany">
<div class="modalBackground">
</div> <!--end of modal background-->
<div class="modalContainer">
<div class="modal">
<div class="modalTop"><div align="left"><b>Company Search</b></div><apex:commandbutton action="{!clearcompanylist}" value="Cancel" oncomplete="hideModal('modalPageCompany')"/>
</div>
<div class="modalBody">
<apex:pageBlock >
<table>
<tr><td width="20%" align="right"><apex:outputlabel value="Name: "/></td><td  width="30%"><apex:inputtext value="{!CompanyNameSearch}" id="CompanyNameSearch"/></td></tr>
<tr><td colspan="2" align="center" style="width:100%;"><apex:commandButton value="Search" action="{!searchCompany}"  reRender="clearcompanybutton,companysearchdisplay,CompanyAddButton,NoComprecord,selectcompanytext"/>
<apex:commandButton id="clearcompanybutton" value="Clear" action="{! clearcompanylist}"  reRender="clearcompanybutton,companysearchdisplay,CompanyNameSearch,NoComprecord,selectcompanytext" disabled="{! companyclearbuttondisplay}"/>
</td></tr>
</table>  
</apex:pageblock>
<apex:pageblock id="companysearchdisplay" >
<apex:commandLink id="selectcompanytext" action="{!selectAllCompany}" value="{! SelectallCompany}" rerender="companysearchdisplay,companysearchtable,selectcompanytext" rendered="{! companyListDisplay}"/>
<center> <apex:commandButton id="CompanyAddButton" value="Add" action="{!addcompanies}"  onclick="IsChecked3('modalPageCompany')" rerender="companiesblock,addedcompaniesdatatable,companycountlabelid" /></center>
<center>
<apex:outputlabel id="NoComprecord" value="No Records Found" rendered="{! Nocomprecfound}"/>
</center>
<center>
<apex:commandLink action="{!prevCompanySearch}" value="Previous"  rerender="companysearchdisplay" rendered="{!prevCompSearchListCheck}"/>&nbsp;&nbsp;
<apex:commandLink action="{!nextCompanySearch}" value="Next"  rerender="companysearchdisplay" rendered="{!nextCompSearchListCheck}"/>          
</center>    
<apex:pageBlocktable id="companysearchtable" value="{!companySearchListdisplay}"  var="CSL" rendered="{!companyListDisplay}">
<apex:column headervalue="Add"><apex:inputcheckbox value="{!CSL.addCompany}" onclick="disp3(this)">
<apex:actionSupport event="onclick" action="{!enablecompadd}"  reRender="companysearchdisplay"/>    
</apex:inputcheckbox></apex:column>
<apex:column headerValue="Company Name" value="{!CSL.CompanyName}"/>
</apex:pageBlocktable>
<center>
<apex:commandLink action="{!prevCompanySearch}" value="Previous"  rerender="companysearchdisplay" rendered="{!prevCompSearchListCheck}"/>&nbsp;&nbsp;
<apex:commandLink action="{!nextCompanySearch}" value="Next"  rerender="companysearchdisplay" rendered="{!nextCompSearchListCheck}"/>          
</center>  
<apex:inputhidden id="hid3"/>
</apex:pageBlock>                         
</div> <!--end of modal body-->

</div><!--end of modal--> </div><!--end of modal container--> </div> <!-- end of modalcompany div--> <!--End Div tag for company-->

 

    //procedures for companies
    public void clearcompanylist()
    {
        companyaddbuttondisplay =true; 
        companyclearbuttondisplay =true;
        companyListDisplay =false;
        CompanyNameSearch =''; 
        Nocomprecfound =false;
        if (companySearchList.size() >0)
            companySearchList.clear();
        prevCompSearchListCheck= false; 
        nextCompSearchListCheck= false; 
        SelectallCompany=''; 
    }
    public void searchCompany()
    {
        companySearchListDisplay = new List<searchCompanies>();
        companySearchList = new list<searchCompanies>();
        companySearchListDisplay.clear();
        companySearchList.clear();
        Nocomprecfound=false;
        // to clear the search list before every search
        if (companySearchListdisplay.size() >0) // to be deleted for pagenation
            companySearchListdisplay.clear();
        
        if (companySearchList.size() >0)
            companySearchList.clear();
        
        if(CompanyNameSearch!=null)
            CompanyNameSearch ='\'%'+CompanyNameSearch+'%\'';
        else
           CompanyNameSearch ='\'%%\'';
        try
        {
            String querystring = 'select id, name from account where Inactive__c=false and name like '+CompanyNameSearch+' limit 100' ;
            String excludedid='';
            if (compsearhexcludeidmap.size() >0)
            {
                for (id compid: compsearhexcludeidmap.keyset())
                    excludedid= excludedid+ '\''+ compsearhexcludeidmap.get(compid).companyid+ '\''+',';
                excludedid =excludedid.substring(0,excludedid.length()-1);    
                querystring= querystring + ' and id not in ('+  excludedid + ')';
            }
            system.debug('the string is ' +querystring );
            List <account> company = database.query(querystring);
            companyclearbuttondisplay =false;
            if (company.size()>0)
            {
                system.debug(company);
                searchCompanies searchcomp;
                for (account a: company)
                {
                    searchcomp = new searchCompanies();
                    searchcomp.companyId = a.Id + '';
                    searchcomp.addcompany = false;
                    searchcomp.companyName =a.name;
                    searchcomp.initiallypresent =false;
                    companySearchList.add(searchcomp);
                    //companySearchListdisplay.add(searchcomp);// to be changed when pagenation implemented
  
                }
                companyListDisplay =true;
                SelectallCompany='Select All';
                nextCompSearchList =0; // to be changed when pagenation implemented           
                nextCompanySearch();// to be changed when pagenation implemented
            }    
            else
                Nocomprecfound=true;//the search returned nothing.
        }
        catch(SearchException se)
        {
            CompanyNameSearch ='Encountered exception. please correct it again thats it';
            system.debug('encountered error. Error is: '+se);
            ApexPages.addMessages(se);
        }           
    }
    
    public void addcompanies()
    {
//        addedcompanyList.clear();
        for(searchCompanies sc :companySearchList)
            if(sc.addCompany==True)
            {
                addedcompanyList.add(sc);
                compsearhexcludeidmap.put(sc.companyid,sc);
            }    
        system.debug('the list of companies to be added '+addedcompanyList); 
        addedcompanyblockdisplay =(addedcompanyList.size() >0)? true:false;
        companycount = addedcompanyList.size();
        nextCompAddedList =0;
        nextAddedCompany();
    }
    
    public void removeCompany()
    {
        system.debug('remove id = '+ deletecompanyId);
        if (compsearhexcludeidmap.get(deletecompanyId)!=null)
        {
            if(compsearhexcludeidmap.get(deletecompanyId).initiallypresent ==true)
               deletecompfromgroupobj.add(compsearhexcludeidmap.get(deletecompanyId).recordId);
            
            compsearhexcludeidmap.remove(deletecompanyId);         
            addedcompanyList.clear();
            for(id compid:compsearhexcludeidmap.keyset())
                addedcompanyList.add(compsearhexcludeidmap.get(compid));
            companycount = addedcompanyList.size();
            addedcompanyblockdisplay =(addedcompanyList.size() >0)? true:false;       
            nextCompAddedList =0;
            nextAddedCompany();
        }
        system.debug('the list of companies to be deleted are '+deletecompfromgroupobj);        
        system.debug('to be shown are '+addedcompanyList);    
    }
    public void selectAllCompany()
    {
        if(selectAllCompanyCheck==True)
        {
            selectAllCompanyCheck=false;
            SelectallCompany ='Select All';
            companyaddbuttondisplay =true;
        }    
        else
        {
            selectAllCompanyCheck=True;
            SelectallCompany ='Deselect All';
            companyaddbuttondisplay =false;
        }
        for(Integer loopCounter=0;loopCounter<companySearchListdisplay.size();loopCounter++)
            companySearchListdisplay[loopCounter].addcompany=selectAllCompanyCheck;
    }
    public void prevCompanySearch()
    {
        companySearchListdisplay.clear();            
        Integer limit1 = 0; 
        nextCompSearchListCheck=True;                
        if((nextCompSearchList - (CompSearchCount+CompSearchCount)) > 0)
        {                    
            limit1 = nextCompSearchList -CompSearchCount;
            prevCompSearchListCheck= True; 
        }                   
        else                
        {                    
            limit1 = nextCompSearchList -CompSearchCount ;
            prevCompSearchListCheck= false;                
        }                                    
        for(Integer i=nextCompSearchList - (CompSearchCount+CompSearchCount); i<limit1; i++)                  
            companySearchListdisplay.add(CompanySearchList[i]);             
        nextCompSearchList -=CompSearchCount;
        enablecompadd();
    }
    public void nextCompanySearch()
    {
        companySearchListdisplay.clear();
        integer limit1=0;
        if(nextCompSearchList +CompSearchCount < CompanySearchList.size()) 
        {                   
            limit1 = nextCompSearchList +CompSearchCount ; 
            nextCompSearchListCheck=True;
        }               
        else                
        {                    
            limit1 = CompanySearchList.size();                    
            nextCompSearchListCheck= false;                
        } 
        if(nextCompSearchList >0)
            prevCompSearchListCheck=True;
        else
            prevCompSearchListCheck=False;
                                           
        for(Integer i=nextCompSearchList; i<limit1; i++)                  
            companySearchListdisplay.add(CompanySearchList[i]);
        nextCompSearchList +=CompSearchCount;
        enablecompadd();       
    } 
    public void prevAddedCompany()
    {
        addedcompanyListdisplay.clear();            
        Integer limit1 = 0; 
        nextCompAddedListCheck=True;                
        if((nextCompAddedList- (CompAddedCount+CompAddedCount)) > 0)
        {                    
            limit1 = nextCompAddedList -CompAddedCount;
            prevCompaddedListCheck= True; 
        }                   
        else                
        {                    
            limit1 = nextCompAddedList -CompAddedCount;
            prevCompaddedListCheck= false;                
        }                                    
        for(Integer i=nextCompAddedList- (CompAddedCount+CompAddedCount); i<limit1; i++)                  
            addedcompanyListdisplay.add(addedCompanyList[i]);             
        nextCompAddedList -=CompAddedCount;
        
    }
   
    public void nextAddedCompany()
    {
        addedcompanyListdisplay.clear();
        integer limit1=0;
        if(nextCompAddedList +CompAddedCount< addedCompanyList.size()) 
        {                   
            limit1 = nextCompAddedList +CompAddedCount; 
            nextCompAddedListCheck=True;
        }               
        else                
        {                    
            limit1 = addedCompanyList.size();                    
            nextCompAddedListCheck= false;                
        } 
        if(nextCompAddedList >0)
            prevCompaddedListCheck=True;
        else
            prevCompaddedListCheck=False;
                                           
        for(Integer i=nextCompAddedList ; i<limit1; i++)                  
            addedcompanyListdisplay.add(addedCompanyList[i]);
        nextCompAddedList +=CompAddedCount;       
    }
    public void removeallCompanies()
    {
        for(id compid:compsearhexcludeidmap.keyset())
            if(compsearhexcludeidmap.get(compid).initiallypresent ==true)
                deletecompfromgroupobj.add(compsearhexcludeidmap.get(compid).recordId);
        compsearhexcludeidmap.clear();
        addedcompanyList.clear();
        companycount = addedcompanyList.size();
        addedcompanyblockdisplay =(addedcompanyList.size() >0)? true:false;  
        nextCompAddedList =0;
        nextAddedCompany();
     
    }
    public void enablecompadd()
    {
        integer i=0;
        for(Integer loopCounter=0;loopCounter<companySearchList.size();loopCounter++)
            if (companySearchList[loopCounter].addcompany==true)
            {
                i=1;
                break;
            }
            if (i==1)
                companyaddbuttondisplay =false;
            else
                companyaddbuttondisplay =true; 
    }

 The Class is as above,  the code marked in Red is the code which throws the error.

Please help me with the same. :smileysad:

 

- TIA

 

Sushupsi.

<style>
#modalPageContact
{
    display: none;
    position: absolute;
    width: 100%;
    height: 80%;
    top: 0px; left: 0px;
}
#modalPageEmp
{
    display: none;
    position: absolute;
    width: 100%;
    height: 80%;
    top: 0px; left: 0px;
}
#modalPageCompany
{
    display: none;
    position: absolute;
    width: 100%;
    height: 80%;
    top: 0px; left: 0px;
}
.modalBackground
{
    filter: Alpha(Opacity=40); -moz-opacity:0.4; opacity: 0.4;
    width: 100%; height: 100%; background-color: #999999;
    position: absolute;
    z-index: 500;
    top: 0px; left: 0px;
}
.modalContainer
{
    position: relative;
    width: 300px;
    left: 50%;
    top: 50%;
    z-index: 750;
}
.modal
{
    background-color: white;
    border: solid 2px #BE5E5E; position: relative;
    top: -150px;
    left: -150px;
    z-index: 1000;
    width: 600px;
    height: 400px;
    padding: 0px;
}
.modalTop
{
    width: 594px;
    background-color: #BE5E5E;
    padding: 4px;
    color: #ffffff;
    text-align: right;
}
.modalTop a, .modalTop a:visited
{
    color: #ffffff;
}
.modalBody
{
    padding: 10px;
}
</style>


<!--Start for companies tab-->
<apex:tab label="Companies" name="companies" style="font-weight:bold;">
<table width="100%">
    <tr><td><apex:outputLabel style="font-weight:bold;" value="Number of Companies: "/><apex:outputlabel id="companycountlabelid" style="font-weight:bold;color:blue;" value="{!companycount}"/></td></tr>
</table><br/>
<apex:pageBlock title="Companies" id="companiesblock" >
<center>
<apex:commandButton value="Add" action="{!clearcompanylist}" onclick="revealModal ('modalPageCompany')" reRender="companysearchdisplay,CompanyNameSearch"/>
<apex:commandButton value="Remove All"  reRender="companycountlabelid,companiesblock,addedcompaniesdatatable" action="{!removeallCompanies}"/>
</center>
<apex:pageBlocktable id="addedcompaniesdatatable" value="{! addedcompanyList}" var="ACL" rendered="{!addedcompanyblockdisplay}">
<apex:column headervalue="Action" width="5%"><apex:commandLink value="Remove"  reRender="companiesblock,addedcompaniesdatatable,companycountlabelid" action="{!removeCompany}">
<apex:param name="testparam" assignTo="{!deleteCompanyId}" value="{! ACL.companyId}"/></apex:commandlink></apex:column>
<apex:column headerValue="Company Name" value="{!ACL.CompanyName}"/>
</apex:pageBlocktable>
<apex:inputhidden id="hid3"/>
</apex:pageBlock>
</apex:tab>
<!--End for companies tab--> 

 

Hello everyone,

 

Is there any way to have in Contact Layout the number of activities that I've had with him? Because we would like to know which clients require more attention and resources.

  • November 04, 2010
  • Like
  • 0

Hi,

I am unable to downlaod the force.com developer guide.can anybody plz send me the  link.

Thanks

Hi ,

 

I have  a javascript list button with a lot of validation and stuff for the selected lines.This button creates a new purchase order at the end  and opens the new purchase order form.My code was something like this:

 

..../*validation code*/...

 

--at the end if evrything is ok i have something like this where the fields of the new purchase order form get prepopulated using the address--

 

window.location.href ="/a0I/e?retURL=%2Fa0I%2Fo"+
"&CF00NR0000000cvG6={!Sales_Order__c.Name}"+
"&CF00NR0000000cvEt={!Sales_Order__c.Default_Warehouse__c}";

 

Now for further development i needed to have a visualforce new form for purchase orders....

So now iam unable to prepopulate this....

the addresses look wierd..


window.location.href ="/a0I/e?retURL=%2Fa0I%2Fo"+
"&j_id0:j_id1:j_id29:j_id33:test={!Sales_Order__c.Name}"+

 

I need to be able to retain the earlier javascript code because of the complex validations........Can someone please help me with this prepopulating?

 

 

fellow developers,

here is a custom search engine built for you , please test drive and let me know your feedback via feedback button on the site.

www.cloudgofer.com , also feel free to send in request to add more salesforce specific sites to the custom search engine.

 

No more going through different manuals or guides to lookup a syntax for tag or an API.

Hello,

 

   I am actually a .net developer but I am going to self study SalesForce and I need to pass the 401 developer exam. Can you please tell me what and from where I should study? and provide me with any dumps and samples questions please?

 

Thanks,

   sally

This makes absolutely no sense to me. I am trying to insert two OpportunityLineItems that are exactly the same but I get this exception. What good reason is there to stop the insertion of two Records that are the same?

I understand if this was an upsert operation as you can't insert and update and the same time but I am inserting two brand new OpportuntiyLineItem records.

Thanks,
Jason


Message Edited by TehNrd on 09-24-2008 04:48 PM
  • September 24, 2008
  • Like
  • 0