• rani
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 15
    Replies
Hi, We are facing a problem when upgrading an scontrol from ajax beta 3.3 to ajax 16.0. Our scontrol (ajax beta 3.3 version) is using turbo widgets (turbo grid). We are geting an error with CONTROLLER.BUILD method. Did any one face the same problem. Your help is greatly appreciated. Thanks.
  • December 03, 2010
  • Like
  • 0
Hi, We are trying to acheive pagination using a custom controller and we are unable to complete the same. For instance we are trying to show the next hyperlink on the first page and then the second page should show both next & previous links if there is a third page and the last page should just show the previous link. Can we acheive this using VF page and apex code. If then how do we do it? Your help would be appreciated.
  • November 08, 2010
  • Like
  • 0
We sre trying to sort the columns in a visualforce page and are displaying the up/down icons next to the columns to direct the users what type of sort it is. but we see that there are reflexes of that image. Is there any solution to prevent reflexes? Your comments would be appreciated.
  • November 04, 2010
  • Like
  • 0

Hi,

 

I need help in building a SOQL query to retrieve data by joining a parent and child table.

 

Following is my requirement, i need data from parent table where either the parent record is modified from last one day or its corresponding child record is modified from last one day.

 

For example, i have account table and client table which is child to account, i've written the following query:

 

select id , name from account where lastmodifieddate > yesterday or id in (select account__c from client__c where lastmodifieddate > yesterday)

 

The above query throws an error saying that "OR" condition is not accepted in semi join queries.

 

Can anyone let me know how should i retrieve data in the above scenario?

 

Help is very mush appreciated.

 

Regrads,

Rani

  • September 16, 2009
  • Like
  • 0

Hi,

 

I've a custom application where I add users in bulk to account team. First the application bulk inserts all the records in account share object and then insert all those records in account team but few times while adding the records to account team for few records I am getting the following error:

 

"unable to obtain exclusive access to this record"

 

Can some one help me regarding this, according to my knowledge this error occurs when locking happens i.e. when a respective record is modified simultaneously by 2 processes.

 

Your help is appreciated.

 

Regards,

Rani

  • March 02, 2009
  • Like
  • 0

Hi All,

 

I want to create a trigger on Opportunity which would update a field on Opportunity depending on values from Events associated with that Opportunity. Event has a date field and the maximum of that field should be updated to one of the Opportunities field when the Opportunity is updated and meets the criteria.

 

Regards,

Rani

  • January 23, 2009
  • Like
  • 0
Hi All,
 
I am using describeLayout method to retrieve page layout assigned for a provided object and record typeid.
 
sForce.DescribeLayoutResult dlr = binding.describeLayout(ObjectName, RecordTypeId);
 
The above call gives me the page layout assigned to my profile.
 
My profile is System Integration (Modify All Data) and can view all data in sales force UI i.e the matrix of page layout assignment for given objects profiles VS record type. But the same i am unable to do thru API call, it only gives the page layout assigned to my profile.
 
Is there any option for me to find out page layout assigned for given object name, record type and profile thru API call.
 
Any help would be appreciated.
 
Regards,
Rani
  • December 18, 2008
  • Like
  • 0
Hi All,

I've written a code in c# to send an email using API and using template in sales force, but i am unable to access the variables in the template i.e. how would the variables get values in templates by using API.

My template body has following variable {!Opportunity.Account} which contains account name of the opportunity.
And following is my code:

SingleEmailMessage[] messages = new SingleEmailMessage[1];
messages[0] = new SingleEmailMessage();
messages[0].emailPriority = EmailPriority.High;
messages[0].replyTo = "test@salesforce.com";
messages[0].saveAsActivity = false;
messages[0].targetObjectId = "005R0000000HncC";
messages[0].useSignature = true;
messages[0].templateId = "00X40000000nbZ8";
SendEmailResult[] result = binding.sendEmail(messages);

The email is being sent successfully but with no account name. i.e. if the template body is "Opportunities account name is {!Opportunity.Account}" then it is sent as "Opportunities account name is"

Can anyone help me to find out how should i relate the object and object id from code i.e. how to fill the variables which are used in template body.

Help is appreciated.

Regards,
Rani
  • September 17, 2008
  • Like
  • 0
Hi All,
 
I have a trigger on Opportunity (after insert and before update) and its working fine as expected. But i found that the trigger is not getting fired when we change the account owner and check the option to even change the opportunity owner. In this situation the opportunity owner is getting changed but the trigger functionality is not happening i.e. trigger is not getting fired. Please suggest.
 
Help is appreciated.
 
Regards,
Rani
  • July 25, 2008
  • Like
  • 0
Hi All,
 
I have created a trigger on opportunity which sould fire both before insert and before update. Its working fine for all stages of opportunity when the opportunity is edited i.e. before update, but the trigger is not firing when the opportunity is created for few stages and firing for few stages. The trigger is getting fired when an opportunity is created with stage name as first call schedule or proposal and not firing for other stages i.e. lead generated, executive overview or analysis or feebback/demo or closed won or closed lost or stalled.
 
Help is appreciated.
 
Regards,
Rani


Message Edited by rani on 07-11-2008 07:41 AM
  • July 11, 2008
  • Like
  • 0
Admin,
 
I have job which updates records from my local DB to sales force. After the job has been completed i have checked the log file which shows the following error:
 
"An unexpected error occured. Please include this ErrorId if you contact support: 1950912704-936"
 
Please let me know what does this error mean and what steps should i take to over come this error.
 
 
Regards,
Rani
  • January 31, 2008
  • Like
  • 0
I've written a program where a User of let say Profile "A" will create a Lead for other Record Type lets say "B" which is not related to his profile. i.e. "B" record type doesnt belong to Profile "A".
 
It is saying that the user of this profile cannot create a lead of the specified record type.
 
Following is the error message:
 
"Error creating Lead: Record Type ID: id value not valid for the users profile"
 
Should i change any configuration values or something else where i can over come this problem.
 
Can someone please help me
 
  • June 08, 2007
  • Like
  • 0
I want to know the name of the Object which stores the Field Level Security Information. I.e. information regarding the profile which has rights over a certain field.
  • May 24, 2007
  • Like
  • 0
Hi All,
 
I have custom object "abc__c" in which there is a field name "Account__c" which stores Account Id. I want to get results from object name "Account" and "abc__c" where "Accoun.SystemMobStamp >= some date or abc__c.SystemMobStamp >= some date". The query in SQL would like:
 
Select
Account.Id, abc__c.Account__c
Where
Account.Id = abc__c.Account__c and
(Account.SystemMobStamp >= some date or abc__c.SystemModStamp >= some date)
 
Can some one provide a equalent statement for above in Sales Force (SOQL).
 
Help is appreciated.
 
Regards,
Rani
  • March 12, 2007
  • Like
  • 0
My requirement is a user has to see some data regarding Partner and only Admin has the rights to see the Partner details, so i require to change the login details in between the page as admin. Can some one help me how to do this. (In AJAX S-Control)
 
Any kind of help is appreciated.
 
Regards,
Rani
  • November 07, 2006
  • Like
  • 0
Hi All,
I have created a new opportunity. After creating i have tried to retrive the new Opportunity Id by the following way, but is saying that it is undefined.
 
var saveResult = sforceClient.create([Opportunity]);

for (var i=-;i<saveResult.length;i++) {

    if (saveResult[i].success == true) {

       alert("Yay!! I created a record and the Id of the new record is: " + saveResult[i].Id);

    } else {

       alert("Rats!  There was a problem and I think the problem is: " + saveResult[i].errors[0].message);

    }

}

the saveResults[i].Id is not giving the newly created opportunity id. Can someone tell me how to get newly created opportunity id.

Any kind of help is appreciated.

Rani

  • October 26, 2006
  • Like
  • 0
Hi, We are trying to acheive pagination using a custom controller and we are unable to complete the same. For instance we are trying to show the next hyperlink on the first page and then the second page should show both next & previous links if there is a third page and the last page should just show the previous link. Can we acheive this using VF page and apex code. If then how do we do it? Your help would be appreciated.
  • November 08, 2010
  • Like
  • 0

Hi,

 

I need help in building a SOQL query to retrieve data by joining a parent and child table.

 

Following is my requirement, i need data from parent table where either the parent record is modified from last one day or its corresponding child record is modified from last one day.

 

For example, i have account table and client table which is child to account, i've written the following query:

 

select id , name from account where lastmodifieddate > yesterday or id in (select account__c from client__c where lastmodifieddate > yesterday)

 

The above query throws an error saying that "OR" condition is not accepted in semi join queries.

 

Can anyone let me know how should i retrieve data in the above scenario?

 

Help is very mush appreciated.

 

Regrads,

Rani

  • September 16, 2009
  • Like
  • 0

I think I have read every hit I have found on how to call "Next" and "Previous" for pagination and have spend the better part of 12 hours on this and I am hoping that its easy and I am just missing the obvious...I tried each example I have come across on the board and I cannot get the "Next" button to display the remaining records I am calling.

 

I have this same page as the examples below using the StandardController for Opportunity and the "Next" and "Previous" works just fine but the records don't sort so it is a bit messy as there are generally 70 - 90 records that fit the "where" criteria at any giving time.  I wrote the CustomController from the posts on the boards and it sorts beautifully but I can only see 20 records - so while it is no longer messy, it is useless :-(

 

If someone can offer some advice on how to have a sorted list that also paginates - I would certainly appreciate it! (all this because no one wants to READ the stages of "Green", "Yellow" and "Red" they want the row to be painted the actual colors. GEEZ!)

 

 

public with sharing class SortOps { public ApexPages.StandardSetController setCon { get { if(setCon == null) { setCon = new ApexPages.StandardSetController(Database.getQueryLocator([select name, territory.name, stagename, stagenumber__c, closedate,Account.BillingCity, Account.BillingState, Account.National_Account__c, Account.National_Account_Affiliation__c,Account_Type_Profile__c,Amount,Net_Unit_Price__c,Win_Timeframe__c,Competitive_Market__c,ID_d_Financial_Buyer__c,Approval_Process_Outlined__c,APV__c,Business_Plan_Presented__c,ID_d_Referral_Network__c,Documented_Referral_Network__c,ID_d_Budget_Year__c,Executive_Level_Meeting__c,ID_d_Clinical_Champion__c,System_Quotation_Presented__c,Project_Funded__c,Customer_Targeted_Purchase__c,ID_d_Referring_Physicians__c,BoD_Approval_Received__c,CreatedDate, recordtype.name from Opportunity where stagename = 'Yellow' OR stagename = 'Green' OR stagename='Red' Order BY recordtype.name, territory.name, stagenumber__c, closedate ASC])); } return setCon; } set; } public List<Opportunity> getOpportunities() { return (List<Opportunity>) setCon.getRecords(); } public PageReference next() { return null; } public PageReference previous() { return null; } public Boolean hasPrevious { get { return setCon.getHasPrevious(); } } public Boolean hasNext { get { return setCon.getHasNext(); } } }

 

 

<apex:page Controller="SortOps" recordSetVar="{!opportunities}"> <apex:form > <style> .dateFormat{display:none;} </style> <style type="text/css"> .h1 {background-color:#D8D8D8; border-width: 2px; border-spacing: 4px; padding: 2px; border-style: inset; border-color: :#D8D8D8; border-collapse: separate;} </style> <apex:pageBlock > <apex:pagemessages /> <apex:dataTable width="100%" border="1" id="DataTable" value="{!Opportunities}" var="o" id="opp_table" style="font-size:11px;text-align: center; vertical-align:top;word-wrap: break-word;height: 20px;" headerClass="h1" columnsWidth="150,70,130,70,20,40,80,120,30,30,120,50,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,120"> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height:20px;"> <apex:facet name="header"><b>Stage</b></apex:facet> <apex:OutputText value="{!o.stagename}" /> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))}; height: 20px; white-space: nowrap"> <apex:facet name="header"><b>Territory</b></apex:facet> <apex:OutputText value="{!o.territory.name}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80;',if(o.stagename='Yellow','background-color:#F3F781;','color:black')))}; height: 20px; text-align: left;white-space: nowrap"> <apex:facet name="header"><b>Opportunity Name</b></apex:facet> <a href="/{!o.Id}">{!o.Name }</a> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))}; height: 20px; white-space: nowrap"> <apex:facet name="header"><b>Billing City</b></apex:facet> <apex:outputtext value="{!o.Account.BillingCity}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>Billing State</b></apex:facet> <apex:outputtext value="{!o.Account.BillingState}" /> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>National Account</b></apex:facet> <apex:outputField value="{!o.Account.National_Account__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))}; height: 20px;white-space: nowrap"> <apex:facet name="header"><b>National Account Affiliation</b></apex:facet> <apex:Outputfield value="{!o.Account.National_Account_Affiliation__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))}; height: 20px;white-space: nowrap"> <apex:facet name="header"><b>Market Segment - Account</b></apex:facet> <apex:outputField value="{!o.Account_Type_Profile__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};text-align: right; height: 20px; white-space: nowrap"> <apex:facet name="header"><b>Amount</b></apex:facet> <apex:outputfield value="{!o.Amount}" /> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};text-align: right; height: 20px; white-space: nowrap"> <apex:facet name="header"><b>Net Unit Price</b></apex:facet> <apex:outputfield value="{!o.Net_Unit_Price__c}" /> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>Win Date</b></apex:facet> <apex:outputfield value="{!o.closeDate}" /> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))}; height: 20px;width: 50px"> <apex:facet name="header"><b>Fiscal Period</b></apex:facet> <apex:outputField value="{!o.Win_Timeframe__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))}; height: 20px;"> <apex:facet name="header"><b>Competitive Market?</b></apex:facet> <apex:outputField value="{!o.Competitive_Market__c}" /> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>IDd Financial Buyer?</b></apex:facet> <apex:outputField value="{!o.ID_d_Financial_Buyer__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>Approval Process Outlined?</b></apex:facet> <apex:outputField value="{!o.Approval_Process_Outlined__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>Customer Targeted Purchase?</b></apex:facet> <apex:outputField value="{!o.Customer_Targeted_Purchase__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>System Quotation Presented?</b></apex:facet> <apex:outputField value="{!o.System_Quotation_Presented__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};font-weight:bold; height: 20px;"> <apex:facet name="header"><b>Current Annual Patient Volume</b></apex:facet> <apex:outputfield value="{!o.APV__c}" style="width: 40px" styleClass="title"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>Business Plan Presented?</b></apex:facet> <apex:outputField value="{!o.Business_Plan_Presented__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>IDd Referral Network?</b></apex:facet> <apex:outputField value="{!o.ID_d_Referral_Network__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>Documented Referral Network?</b></apex:facet> <apex:outputField value="{!o.Documented_Referral_Network__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>IDd Budget Year?</b></apex:facet> <apex:outputField value="{!o.ID_d_Budget_Year__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>Executive Level Meeting?</b></apex:facet> <apex:outputField value="{!o.Executive_Level_Meeting__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>IDd Clinical Champion?</b></apex:facet> <apex:outputField value="{!o.ID_d_Clinical_Champion__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>System Quotation Presented?</b></apex:facet> <apex:outputField value="{!o.System_Quotation_Presented__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>Project Funded?</b></apex:facet> <apex:outputField value="{!o.Project_Funded__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>IDd Referring Physicians?</b></apex:facet> <apex:outputField value="{!o.ID_d_Referring_Physicians__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))};height: 20px;"> <apex:facet name="header"><b>BoD Approval Received?</b></apex:facet> <apex:outputField value="{!o.BoD_Approval_Received__c}"/> </div> </apex:column> <apex:column > <div style="{!if(o.StageName='Red','background-color:#FE2E2E', if(o.StageName='Green','background-color:#00FF80',if(o.stagename='Yellow','background-color:#F3F781','color:black')))}; height: 20px;white-space: nowrap"> <apex:facet name="header"><b>Created Date</b></apex:facet> <apex:outputField value="{!o.CreatedDate}"/> </div> </apex:column> ....... </apex:dataTable> <apex:panelGrid columns="2" style="font-weight: bold;"> <apex:commandLink action="{!previous}"><font color="blue">Previous</font></apex:commandLink> <apex:commandLink action="{!next}" ><font color="blue">Next</font></apex:commandLink> </apex:panelGrid> </apex:pageBlock> </apex:form> </apex:page>

 

I am building an advanced search page using VisualForce for objects in our SalesForce implementation.  Because of the multiple variables and situations and the limitations of Apex and SOQL in general, I have chosen to build dynamic SOQL to accomplish my goals.  This is all working fine but I am having some issues with a relationship query and I'm having a bit of trouble wrapping my head around the proper resolution.  I am building a SOQL query to search the "Account" standard object but in our SalesForce we have a "Location" custom object that holds geographic location for accounts.  It is a master/child relationship so an account(parent) can have multiple locations(children).  If someone enters a city, the SOQL query WHERE must check againt a field in Location and not Account.  An example query is as follows:

 

SELECT Id, Account_ID__c, Name FROM Account WHERE Name = :accountName AND Locations__r.City__c = :accountCity ORDER BY Account_ID__c DESC

 

This does not work for me and does not even make sense to me that it would work.  In SQL this would be accomplished with a join between account and location and then you could check against the city, but there are no joins in SOQL.  The above query needs to return all accounts where name = "variable account name" and location.city = "variable account city".  A single account can have multiple cities though as each location for a particular account is a different address.  I probably did a poor job of explaining this, but if anyone can give me some insight as to how to get this done or let me know what I'm doing incorrectly, it would help quite a bit.

 

Thanx 

Hi All,

 

I want to create a trigger on Opportunity which would update a field on Opportunity depending on values from Events associated with that Opportunity. Event has a date field and the maximum of that field should be updated to one of the Opportunities field when the Opportunity is updated and meets the criteria.

 

Regards,

Rani

  • January 23, 2009
  • Like
  • 0
I have a webservice located on my local for testing http://localhost:2114/WS_ClientOrigination/Service.asmx
how to make salesforce to call a function in this webservice?
Hi All,
 
I am using describeLayout method to retrieve page layout assigned for a provided object and record typeid.
 
sForce.DescribeLayoutResult dlr = binding.describeLayout(ObjectName, RecordTypeId);
 
The above call gives me the page layout assigned to my profile.
 
My profile is System Integration (Modify All Data) and can view all data in sales force UI i.e the matrix of page layout assignment for given objects profiles VS record type. But the same i am unable to do thru API call, it only gives the page layout assigned to my profile.
 
Is there any option for me to find out page layout assigned for given object name, record type and profile thru API call.
 
Any help would be appreciated.
 
Regards,
Rani
  • December 18, 2008
  • Like
  • 0
How to invoke VB.Net 2.0 WebService functions once some data are saved/Entered to SalesForce?
any samples? what function I need to use?
Hi All,

I've written a code in c# to send an email using API and using template in sales force, but i am unable to access the variables in the template i.e. how would the variables get values in templates by using API.

My template body has following variable {!Opportunity.Account} which contains account name of the opportunity.
And following is my code:

SingleEmailMessage[] messages = new SingleEmailMessage[1];
messages[0] = new SingleEmailMessage();
messages[0].emailPriority = EmailPriority.High;
messages[0].replyTo = "test@salesforce.com";
messages[0].saveAsActivity = false;
messages[0].targetObjectId = "005R0000000HncC";
messages[0].useSignature = true;
messages[0].templateId = "00X40000000nbZ8";
SendEmailResult[] result = binding.sendEmail(messages);

The email is being sent successfully but with no account name. i.e. if the template body is "Opportunities account name is {!Opportunity.Account}" then it is sent as "Opportunities account name is"

Can anyone help me to find out how should i relate the object and object id from code i.e. how to fill the variables which are used in template body.

Help is appreciated.

Regards,
Rani
  • September 17, 2008
  • Like
  • 0
Hi All,
 
I have created a trigger on opportunity which sould fire both before insert and before update. Its working fine for all stages of opportunity when the opportunity is edited i.e. before update, but the trigger is not firing when the opportunity is created for few stages and firing for few stages. The trigger is getting fired when an opportunity is created with stage name as first call schedule or proposal and not firing for other stages i.e. lead generated, executive overview or analysis or feebback/demo or closed won or closed lost or stalled.
 
Help is appreciated.
 
Regards,
Rani


Message Edited by rani on 07-11-2008 07:41 AM
  • July 11, 2008
  • Like
  • 0
Hi All,
I have created a new opportunity. After creating i have tried to retrive the new Opportunity Id by the following way, but is saying that it is undefined.
 
var saveResult = sforceClient.create([Opportunity]);

for (var i=-;i<saveResult.length;i++) {

    if (saveResult[i].success == true) {

       alert("Yay!! I created a record and the Id of the new record is: " + saveResult[i].Id);

    } else {

       alert("Rats!  There was a problem and I think the problem is: " + saveResult[i].errors[0].message);

    }

}

the saveResults[i].Id is not giving the newly created opportunity id. Can someone tell me how to get newly created opportunity id.

Any kind of help is appreciated.

Rani

  • October 26, 2006
  • Like
  • 0

In my scontrol, initially I use following statement to initialize the scontrol

 

sforceClient.init("{!API_Session_ID}", "{!API_Partner_Server_URL_70}",true);

 

Then I will query for different things and everything looks great. At particular point of time, I need switch to different user has having more permission to save record.  So I use following line to login

 

sforceClient.init(null, null, false);

sforceClient.setLoginUrl('{!API_Partner_Server_URL_70}');

var loginResult = sforceClient.login(usernameName, userpwdPwd);  //I used some mechanism to hide the userid and password

 

Login work fine , But when I tried update the record  I get the "Permission Denied" error because of ‘trying to get the data from across domain’ issue. I am trying to save the record in sales forces and I am not trying to access different domain. By enabling 'Access data sources across domains' option in IE, work fine.

 

I tried debug more on this and I think found an answer.

 

The URL from sforeceClient (sforceClient.getUrl()) before sforceClient.login (usernameName, userpwdPwd) = https://tapp0.salesforce.com/services/Soap/u/7.0?nocache=1345677777

 

The URL from sforeceClient (sforceClient.getUrl()) after sforceClient.login (usernameName, userpwdPwd) =

 https://tapp0-api.salesforce.com/services/Soap/u/7.0?nocache=1345677777

 

I don’t know why salesforce is returning different url and I think because of this I am getting permission denied error.

I store the old URL before login and used it later ( sforceClient.setURL(oldURl)), everything worked like a rock.

 

Please let me know, what Iam doing is valid one? Any suggesion is really appreciated.. It took solid half a day to figure out this problem.

 

Thanks

Raj

 

  • August 10, 2006
  • Like
  • 0
This forum is for any and all questions related to sharing AppExchange apps and the AppExchange directory, including questions about the listing process/requirements, managing your listings, or the directory itself.
  • April 08, 2006
  • Like
  • 1