-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
8Likes Given
-
55Questions
-
27Replies
Roll up summary based on current year
I have a rollupsummary field(ex: RollupField__c) on Account, which calculates(SUM) the value from custom object field (ex: share__c(Number datatype). I am looking to calculate for the current year.
For, Example If we are in January 2019, If the account does not have any new child records in 2019. The Rollupsummary value should be '0'.
Any suggestions? Thanks
For, Example If we are in January 2019, If the account does not have any new child records in 2019. The Rollupsummary value should be '0'.
Any suggestions? Thanks
-
- Ravindar Admin
- July 17, 2018
- Like
- 0
- Continue reading or reply
Problem with Iframe "Rectangle line"
When we use Iframe for opening a report in Visualforce page, It is appearing with the "Rectangle line" as below. If we scroll down to bottom, the top data is disappearing. Can we remove the "Rectangle line" to make the data appear? or is there any tag to open the report(URL) through the getter methods in Visualforce page Itself.

Visualforce Code:
<div class="container">
<apex:iframe src="{!ReportsTabularUrl}" scrolling="false" id="theIframe" />
<script>document.getElementById('theIframe').height = window.innerHeight - 210;</script>
</div>
Can anyone please help on this?. Thanks.
Visualforce Code:
<div class="container">
<apex:iframe src="{!ReportsTabularUrl}" scrolling="false" id="theIframe" />
<script>document.getElementById('theIframe').height = window.innerHeight - 210;</script>
</div>
Can anyone please help on this?. Thanks.
-
- Ravindar Admin
- July 10, 2018
- Like
- 0
- Continue reading or reply
formula values are not getting in URL in Production
I created a custom button on custom object.
Behavior= "Execute Javascript"
Content Source="Onclick Javascript"
I have written the following code in sandbox. It is working in Sandbox. But, In Production, Formula values are not getting.
sanbox URL when we click on button:
https://scmdev.corp.inpkg.net:8400/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=FR&company=FRANCE&BASEPRODUCT=8022735&OK_CODE=EXECUTE#
Production URL when we click on button:
https://corp.inpkg.net/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=&company=&BASEPRODUCT=8006451&OK_CODE=EXECUTE#
Can anyone please guide on this. How to achieve this?
Behavior= "Execute Javascript"
Content Source="Onclick Javascript"
I have written the following code in sandbox. It is working in Sandbox. But, In Production, Formula values are not getting.
if({!productForce__c.Channel_code__c<>'Z0'&&productForce__c.Channel_code__c<>'Z4'}) { alert('{!$Label.Alert_for_projected_stock}'); } else { window.open("https://{!productForce__c.SAP_Environment__c}.corp.inpkg.net:{!productForce__c.PORT_for_SAP_URL__c}/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language={!productForce__c.Language_Code__c}&company= {!productForce__c.Country_Name__c}&BASEPRODUCT= {!productForce__c.PBcode__c}&OK_CODE=EXECUTE#"); }
sanbox URL when we click on button:
https://scmdev.corp.inpkg.net:8400/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=FR&company=FRANCE&BASEPRODUCT=8022735&OK_CODE=EXECUTE#
Production URL when we click on button:
https://corp.inpkg.net/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=&company=&BASEPRODUCT=8006451&OK_CODE=EXECUTE#
Can anyone please guide on this. How to achieve this?
-
- Ravindar Admin
- July 06, 2018
- Like
- 0
- Continue reading or reply
Javascript code in custom link
Hi, I am using Javascript code in Custom link to open a link or display Error message based on the condition .
Behavior= Execute Javascript
Content Source= Onclik javascript
But, It is not working. Can anyone give suggestion
Behavior= Execute Javascript
Content Source= Onclik javascript
if('{object__c.field1__c}' <> 'Z0' || '{object__c.field1__c}' <> 'Z4') { window.alert("Error Message"); } else { window.open("https://xxxx.net/parmeter1={!object__c.field2}¶meter2={!object__c.field3}"); }
But, It is not working. Can anyone give suggestion
-
- Ravindar Admin
- June 20, 2018
- Like
- 0
- Continue reading or reply
Getting SAP BO report from Salesforce
We are hiting salesforce link to display the SAP BusinessObject . We migrated the SAP BO 4.1 from Windows to Linux 4.2. It was worked fine when we run on Windows. But, It is not working now. Database connection Everthing is fine. As per the suggestions, We have to do modification in URL.
1)) Here, is the Old URL when we run on windows which is given by team:
https://eservices.verallia.com/AdminTools/openDocumentAnonym_Extranet.jsp?sDocName=ExtranetBIView3_11_3&XTYP_CL=US&XVAL_CL=110171|117608&XH_LEVEL=H1&noDetailsPanel=true&XLANGUAGE=fr&LANGUAGE=fr
Suggested to replace '|' in the above url with '%7c' as below:
Suggested URL is as :
https://eservices.verallia.com/AdminTools/openDocumentAnonym_Extranet.jsp?sDocName=ExtranetBIView3_11_3&XTYP_CL=US&XVAL_CL=110171%7C 117608&XH_LEVEL=H1&noDetailsPanel=true&XLANGUAGE=fr&LANGUAGE=fr
When we hit the suggested URL manually, expected o/p is coming in new window without iframe. But, It should include in iframe. We already have page and methods to include it in iframe which worked on windows.
2)But, When we click on the link we are getting below URL which doesn't have "|" .
https://verallia.com/sites/all/common/reporting/proxy.html?t=https%253A%252F%252Feservices.verallia.com%252FAdminTools%252FopenDocumentAnonym_Extranet.jsp%253FsDocName%253DExtranetBIView3_11_3%2526XTYP_CL%253DUS%2526XVAL_CL%253D110171%257C117608%2526XH_LEVEL%253DH1%2526noDetailsPanel%253Dtrue%2526XLANGUAGE%253Den%2526LANGUAGE%253Den&r=https%253A%252F%252Fverallia.force.com%252FWeb_ReportsTabular&n=1&msg=Loading%2520report%2520...
Inspect Elements:

Can anyone give suggestions on this to disaply the report, It will be very glad. Thanks.
1)) Here, is the Old URL when we run on windows which is given by team:
https://eservices.verallia.com/AdminTools/openDocumentAnonym_Extranet.jsp?sDocName=ExtranetBIView3_11_3&XTYP_CL=US&XVAL_CL=110171|117608&XH_LEVEL=H1&noDetailsPanel=true&XLANGUAGE=fr&LANGUAGE=fr
Suggested to replace '|' in the above url with '%7c' as below:
Suggested URL is as :
https://eservices.verallia.com/AdminTools/openDocumentAnonym_Extranet.jsp?sDocName=ExtranetBIView3_11_3&XTYP_CL=US&XVAL_CL=110171%7C 117608&XH_LEVEL=H1&noDetailsPanel=true&XLANGUAGE=fr&LANGUAGE=fr
When we hit the suggested URL manually, expected o/p is coming in new window without iframe. But, It should include in iframe. We already have page and methods to include it in iframe which worked on windows.
2)But, When we click on the link we are getting below URL which doesn't have "|" .
https://verallia.com/sites/all/common/reporting/proxy.html?t=https%253A%252F%252Feservices.verallia.com%252FAdminTools%252FopenDocumentAnonym_Extranet.jsp%253FsDocName%253DExtranetBIView3_11_3%2526XTYP_CL%253DUS%2526XVAL_CL%253D110171%257C117608%2526XH_LEVEL%253DH1%2526noDetailsPanel%253Dtrue%2526XLANGUAGE%253Den%2526LANGUAGE%253Den&r=https%253A%252F%252Fverallia.force.com%252FWeb_ReportsTabular&n=1&msg=Loading%2520report%2520...
Inspect Elements:
Can anyone give suggestions on this to disaply the report, It will be very glad. Thanks.
-
- Ravindar Admin
- June 12, 2018
- Like
- 0
- Continue reading or reply
styles are changing in <li> , If I put <li> in outputpanel
Hi, I am looking to display labels based on the condition for that I am trying to use Outputpanel. But, If I use Outputpanel, <li> styles are changing and Underline is coming on labels when we put mouseover on labels.
Here is the code:
Is there any other option to display list based on the condition without changing the styles? OR please guide me using with Outputpanel. Thanks.
Here is the code:
<apex:outputPanel rendered="{! IsFrenchClient}"> <li class="navmenu-item2"> <apex:outputLink value="/apex/Web_LatestNews_LTG?tags=Glass%20School&thematicPage=1"> Glass School <img class="menu-icon" src="{!URLFOR($Resource.picto_glassschool_white)}"/> </apex:outputLink> </li> </apex:outputPanel> <apex:outputPanel rendered="{! IsFrenchClient}"> <li class="navmenu-item2"> <apex:outputLink value="/apex/Web_LatestNews_LTG?tags=Decor&thematicPage=1"> Décors <img class="menu-icon" src="{!URLFOR($Resource.picto_decors_white)}"/> </apex:outputLink> </li> </apex:outputPanel>
Is there any other option to display list based on the condition without changing the styles? OR please guide me using with Outputpanel. Thanks.
-
- Ravindar Admin
- June 12, 2018
- Like
- 0
- Continue reading or reply
%20 is changing to + through outputLink
Hi, I am using Output link as below:
https://test-test.cs86.force.com/Web_LatestNews_LTG?tags=Selective+Line&thematicPage=1
How to prevent changing '%20' to '+' ?
<apex:outputLink value="/apex/Web_LatestNews_LTG?tags=Selective%20Line&thematicPage=1"> </apex:outputLink>When I click on the link, It should redirect as it is. But, '%20' is changing to '+' as below:
https://test-test.cs86.force.com/Web_LatestNews_LTG?tags=Selective+Line&thematicPage=1
How to prevent changing '%20' to '+' ?
-
- Ravindar Admin
- June 10, 2018
- Like
- 0
- Continue reading or reply
“%20” changing to “+” when passing URL from visualforce page
I am passing URL from Visualforce page as below:
<div class="buttonbox"> <a href="{!communityPrefixe}/Web_LatestNews_LTG?tags=Glass%20School&thematicPage=1">{!$Label.HomePackagingGlass} </a> </div>
The URL should redirects as below:
https://vaqual1-verallia.cs86.force.com/Web_LatestNews_LTG?tags=Selective%20Line&thematicPage=1
But, In the URl "%20" replaced by "+" as below:
https://vaqual1-verallia.cs86.force.com/Web_LatestNews_LTG?tags=Selective**+**Line&thematicPage=1
Can anyone give suggestions on this, Thanks.
<div class="buttonbox"> <a href="{!communityPrefixe}/Web_LatestNews_LTG?tags=Glass%20School&thematicPage=1">{!$Label.HomePackagingGlass} </a> </div>
The URL should redirects as below:
https://vaqual1-verallia.cs86.force.com/Web_LatestNews_LTG?tags=Selective%20Line&thematicPage=1
But, In the URl "%20" replaced by "+" as below:
https://vaqual1-verallia.cs86.force.com/Web_LatestNews_LTG?tags=Selective**+**Line&thematicPage=1
Can anyone give suggestions on this, Thanks.
-
- Ravindar Admin
- June 07, 2018
- Like
- 0
- Continue reading or reply
How to import JSON file into custom object in lightning from UI?
I have Json file which contains custom object data,
I am trying to import records into my custom object. How can i import from UI?
I am trying to import records into my custom object. How can i import from UI?
-
- Ravindar Admin
- December 11, 2017
- Like
- 0
- Continue reading or reply
How to give Running User permission on dashboards to refresh the dashboard on the another account ?
I am using developer account, I have 2 Admin users. I created a Dashboard with report in user1(standard), I modified report of the dashboard. Then I opened user2 account and I refreshed dashboard. It is displaying old Dashboard only. But the report data actually changed. When i click the dashboard, The associated report is displaying with updated data. But it is Showing Information with red colour:
Note: You ran this report by clicking a dashboard component. Results may differ from the dashboard due to your security settings.
How to give Running user permission on the dashboard to both users to refresh the dashboard with updated data. or How to get refreshed dashboard in another admin account?
Note: You ran this report by clicking a dashboard component. Results may differ from the dashboard due to your security settings.
How to give Running user permission on the dashboard to both users to refresh the dashboard with updated data. or How to get refreshed dashboard in another admin account?
-
- Ravindar Admin
- June 16, 2017
- Like
- 0
- Continue reading or reply
How to display the field using javascript?
I have 4 fields: 1)Gender__c 2) Date_of_birth__c 3) Age__c 4) Field4__c
My condition is: If (Gender__c='Female' & Age__c>12) Then display the field4__c.
I tried with the following code, It is displaying When I select the gender='female' & if I enter the value manually which meets the condition: age>12 .
I wrote another Javascript with @RemoteAction to update Age__c when I select the Date_of_birth__c.
It is not displaying the field4__c, If the Age__c is updated from date_of_birth__c.
Code is:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript">
var displayField4 = function() {
var genderVal = $( "[id*='inpFldGender']" ).val();
var ageVal = $( "[id*='inpFldAge']" ).val();
if( genderVal === 'Female' && ageVal > 12 ) {
$( "[id*='inpFld4']" ).show();
$( "[for*='inpFld4']" ).show();
}
else {
$( "[id*='inpFld4']" ).hide();
$( "[for*='inpFld4']" ).hide();
}
};
displayField4();
</script>
My condition is: If (Gender__c='Female' & Age__c>12) Then display the field4__c.
I tried with the following code, It is displaying When I select the gender='female' & if I enter the value manually which meets the condition: age>12 .
I wrote another Javascript with @RemoteAction to update Age__c when I select the Date_of_birth__c.
It is not displaying the field4__c, If the Age__c is updated from date_of_birth__c.
Code is:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript">
var displayField4 = function() {
var genderVal = $( "[id*='inpFldGender']" ).val();
var ageVal = $( "[id*='inpFldAge']" ).val();
if( genderVal === 'Female' && ageVal > 12 ) {
$( "[id*='inpFld4']" ).show();
$( "[for*='inpFld4']" ).show();
}
else {
$( "[id*='inpFld4']" ).hide();
$( "[for*='inpFld4']" ).hide();
}
};
displayField4();
</script>
-
- Ravindar Admin
- June 10, 2017
- Like
- 0
- Continue reading or reply
How to remove the spaces in before and after the string(Not middle space) dynamically?
I am trying to remove space(dynamically) of input string:
Example: string: ' inputString ', Expecting O/p: 'inputString'
Example like : ' Ravi kumar ' Expecting O/p:'Ravi kumar'
I want to remove the space before or after the string or both before and after, not in the middle.
I tried the following but it is removing all the spaces including middle.
inputString = inputString .replaceAll( '\s+', '');
Example: string: ' inputString ', Expecting O/p: 'inputString'
Example like : ' Ravi kumar ' Expecting O/p:'Ravi kumar'
I want to remove the space before or after the string or both before and after, not in the middle.
I tried the following but it is removing all the spaces including middle.
inputString = inputString .replaceAll( '\s+', '');
-
- Ravindar Admin
- June 09, 2017
- Like
- 0
- Continue reading or reply
How to appear a field based on the two different field values?
I have 3 fields on visualforce page of custom object,
1) gender__c:Male/female(picklist field) 2) age__c: (number field) 3) field3__c:(picklist field)
The field3__c only display, If the gender__c=female & age__c>12.
1) gender__c:Male/female(picklist field) 2) age__c: (number field) 3) field3__c:(picklist field)
The field3__c only display, If the gender__c=female & age__c>12.
-
- Ravindar Admin
- June 07, 2017
- Like
- 0
- Continue reading or reply
How to fill a field value from another field in same object before the record is saving in visualforce page?
I created a Visualforce page with custom object fields.
I have date field(date_of_birth__c) & Number field(Age__c).
I am looking to fill the Age__c value before the record is saving into the database.
I can take formula field to calculate the value. But If the date_of_birth__c does not enter, so able to enter age__c manually so I took the age__c field as Number.
I have date field(date_of_birth__c) & Number field(Age__c).
I am looking to fill the Age__c value before the record is saving into the database.
I can take formula field to calculate the value. But If the date_of_birth__c does not enter, so able to enter age__c manually so I took the age__c field as Number.
-
- Ravindar Admin
- June 07, 2017
- Like
- 0
- Continue reading or reply
Updating of many records using Formula field meets any governor limits?
I am Trying to create a report on Object__c. So I am trying to use user custom field(projectName__c) value in custom object field(projectName__c) in filter in Reports.
For that, I got a suggestion to do like below, and filter with Boolean.
Create a formula field in the custom object which is checkbox type and formula will be IF(projectName__c=user.projectName__c,true,false)
And create a report where apply filter forumulaField__c = true.
So, This is working fine. But When I change projectName__c, The all same projectName__c record's will be updated. If I change it to another project again records will be updated. I will have 10 Lakhs records in my application, presently I am using developer account.
Does This updating on 10 lakhs records meets any governor limits?
This help will be very Glad.
Thank you.
For that, I got a suggestion to do like below, and filter with Boolean.
Create a formula field in the custom object which is checkbox type and formula will be IF(projectName__c=user.projectName__c,true,false)
And create a report where apply filter forumulaField__c = true.
So, This is working fine. But When I change projectName__c, The all same projectName__c record's will be updated. If I change it to another project again records will be updated. I will have 10 Lakhs records in my application, presently I am using developer account.
Does This updating on 10 lakhs records meets any governor limits?
This help will be very Glad.
Thank you.
-
- Ravindar Admin
- June 01, 2017
- Like
- 0
- Continue reading or reply
How to use user custom field value in custom object field in filter in Reports?
I am Trying to create a report on Object__c, I have custom field(projectName__c) value on the current user. So while creating the reports, I am planning to filter like below:.
Object__c.projectName__c=currentUser.projectName__c;
How to achieve this?
If you provide the solution, That will be Very glad.
Thanks
Object__c.projectName__c=currentUser.projectName__c;
How to achieve this?
If you provide the solution, That will be Very glad.
Thanks
-
- Ravindar Admin
- May 30, 2017
- Like
- 0
- Continue reading or reply
How to use user's custom field value or current user record value from parent(i.e: custom-obj) (single user having single record) in report filter?
I am creating a report on Object1__c. I have more than 3 users in my account.
When I create a report, I am trying to filter with the value of current user's custom field value.
User is the parent to Object1__c & also Object2__c.
I am planning to update current user custom field (project name) from object__2(which is the parent of object1__c). In object2__c sig1e user having a single record only.
How use current user custom field value in Object1__c filter from object2__c or from user.
When I create a report, I am trying to filter with the value of current user's custom field value.
User is the parent to Object1__c & also Object2__c.
I am planning to update current user custom field (project name) from object__2(which is the parent of object1__c). In object2__c sig1e user having a single record only.
How use current user custom field value in Object1__c filter from object2__c or from user.
-
- Ravindar Admin
- May 29, 2017
- Like
- 0
- Continue reading or reply
How to filter views with referring user?
I am trying to create list Views.
I have 3 objects User, Object2 and Object3.
Object2 having lookup with user & object3 having lookup with Object2.
I save the object2 record with the user.
Object2 & object3 having same one picklist field with values ex: A,B,C .
I am looking to filter list view on 0bject3 as like below.
filter criteria: current user's.object2. picklist value.
How to achieve ?
I have 3 objects User, Object2 and Object3.
Object2 having lookup with user & object3 having lookup with Object2.
I save the object2 record with the user.
Object2 & object3 having same one picklist field with values ex: A,B,C .
I am looking to filter list view on 0bject3 as like below.
filter criteria: current user's.object2. picklist value.
How to achieve ?
-
- Ravindar Admin
- May 20, 2017
- Like
- 0
- Continue reading or reply
how to edit and update a custom object dynamically using button in visualforce page?
Hi, I am trying to update the record in visualforce page with a custom button, how to edit and update a custom object record dynamically.
Apex class:
public class ProfileEditPageController { public object__c ro{set;get;} public ProfileEditPageController(ApexPages.StandardController stdController) { ro=new object__c(); ro=[SELECT name,field__c,Department__c,District__c,Email_Id__c,Employee_Id__c, First_Name__c, Mandal__c, Mobile__c, State__c, User__c, Village__c, Ward_Number__c From object__c where user__r.username=:UserInfo.getUsername()]; } public void updateData() { ro.name="sam" update ro; } }
Visualforce page:
<apex:page standardController="object__c" extensions="ProfileEditPageController"> <apex:form > <apex:pageBlock > <apex:pageBlockSection title=" Details" columns="2"> <apex:inputField value="{!ro.User__c}"/> <apex:inputField value="{!ro.Employee_Id__c}"/> <apex:inputField value="{!ro.First_Name__c }"/> <apex:inputField value="{!ro.name}"/> <apex:inputField label="Email" value="{!ro.email_id__c}" /> <apex:inputField value="{!ro.Mobile__c}"/> <apex:inputField value="{!ro.State__c}"/> <apex:inputField value="{!ro.District__c}"/> <apex:inputField value="{!ro.Mandal__c}"/> <apex:inputField value="{!ro.Village__c}"/> </apex:pageBlockSection> <apex:pageBlockButtons> <apex:commandButton value="Edit" action="{!save}" id="editButton" /> <apex:commandButton value="update" action="{!updateData}" id="saveButton" /> <apex:commandButton value="Cancel" action="{!cancel}" id="cancelButton" /> </apex:pageBlockButtons> </apex:pageBlock> </apex:form>
Apex class:
public class ProfileEditPageController { public object__c ro{set;get;} public ProfileEditPageController(ApexPages.StandardController stdController) { ro=new object__c(); ro=[SELECT name,field__c,Department__c,District__c,Email_Id__c,Employee_Id__c, First_Name__c, Mandal__c, Mobile__c, State__c, User__c, Village__c, Ward_Number__c From object__c where user__r.username=:UserInfo.getUsername()]; } public void updateData() { ro.name="sam" update ro; } }
Visualforce page:
<apex:page standardController="object__c" extensions="ProfileEditPageController"> <apex:form > <apex:pageBlock > <apex:pageBlockSection title=" Details" columns="2"> <apex:inputField value="{!ro.User__c}"/> <apex:inputField value="{!ro.Employee_Id__c}"/> <apex:inputField value="{!ro.First_Name__c }"/> <apex:inputField value="{!ro.name}"/> <apex:inputField label="Email" value="{!ro.email_id__c}" /> <apex:inputField value="{!ro.Mobile__c}"/> <apex:inputField value="{!ro.State__c}"/> <apex:inputField value="{!ro.District__c}"/> <apex:inputField value="{!ro.Mandal__c}"/> <apex:inputField value="{!ro.Village__c}"/> </apex:pageBlockSection> <apex:pageBlockButtons> <apex:commandButton value="Edit" action="{!save}" id="editButton" /> <apex:commandButton value="update" action="{!updateData}" id="saveButton" /> <apex:commandButton value="Cancel" action="{!cancel}" id="cancelButton" /> </apex:pageBlockButtons> </apex:pageBlock> </apex:form>
-
- Ravindar Admin
- May 13, 2017
- Like
- 0
- Continue reading or reply
Problem with Iframe "Rectangle line"
When we use Iframe for opening a report in Visualforce page, It is appearing with the "Rectangle line" as below. If we scroll down to bottom, the top data is disappearing. Can we remove the "Rectangle line" to make the data appear? or is there any tag to open the report(URL) through the getter methods in Visualforce page Itself.

Visualforce Code:
<div class="container">
<apex:iframe src="{!ReportsTabularUrl}" scrolling="false" id="theIframe" />
<script>document.getElementById('theIframe').height = window.innerHeight - 210;</script>
</div>
Can anyone please help on this?. Thanks.
Visualforce Code:
<div class="container">
<apex:iframe src="{!ReportsTabularUrl}" scrolling="false" id="theIframe" />
<script>document.getElementById('theIframe').height = window.innerHeight - 210;</script>
</div>
Can anyone please help on this?. Thanks.
- Ravindar Admin
- July 10, 2018
- Like
- 0
- Continue reading or reply
formula values are not getting in URL in Production
I created a custom button on custom object.
Behavior= "Execute Javascript"
Content Source="Onclick Javascript"
I have written the following code in sandbox. It is working in Sandbox. But, In Production, Formula values are not getting.
sanbox URL when we click on button:
https://scmdev.corp.inpkg.net:8400/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=FR&company=FRANCE&BASEPRODUCT=8022735&OK_CODE=EXECUTE#
Production URL when we click on button:
https://corp.inpkg.net/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=&company=&BASEPRODUCT=8006451&OK_CODE=EXECUTE#
Can anyone please guide on this. How to achieve this?
Behavior= "Execute Javascript"
Content Source="Onclick Javascript"
I have written the following code in sandbox. It is working in Sandbox. But, In Production, Formula values are not getting.
if({!productForce__c.Channel_code__c<>'Z0'&&productForce__c.Channel_code__c<>'Z4'}) { alert('{!$Label.Alert_for_projected_stock}'); } else { window.open("https://{!productForce__c.SAP_Environment__c}.corp.inpkg.net:{!productForce__c.PORT_for_SAP_URL__c}/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language={!productForce__c.Language_Code__c}&company= {!productForce__c.Country_Name__c}&BASEPRODUCT= {!productForce__c.PBcode__c}&OK_CODE=EXECUTE#"); }
sanbox URL when we click on button:
https://scmdev.corp.inpkg.net:8400/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=FR&company=FRANCE&BASEPRODUCT=8022735&OK_CODE=EXECUTE#
Production URL when we click on button:
https://corp.inpkg.net/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=&company=&BASEPRODUCT=8006451&OK_CODE=EXECUTE#
Can anyone please guide on this. How to achieve this?
- Ravindar Admin
- July 06, 2018
- Like
- 0
- Continue reading or reply
styles are changing in <li> , If I put <li> in outputpanel
Hi, I am looking to display labels based on the condition for that I am trying to use Outputpanel. But, If I use Outputpanel, <li> styles are changing and Underline is coming on labels when we put mouseover on labels.
Here is the code:
Is there any other option to display list based on the condition without changing the styles? OR please guide me using with Outputpanel. Thanks.
Here is the code:
<apex:outputPanel rendered="{! IsFrenchClient}"> <li class="navmenu-item2"> <apex:outputLink value="/apex/Web_LatestNews_LTG?tags=Glass%20School&thematicPage=1"> Glass School <img class="menu-icon" src="{!URLFOR($Resource.picto_glassschool_white)}"/> </apex:outputLink> </li> </apex:outputPanel> <apex:outputPanel rendered="{! IsFrenchClient}"> <li class="navmenu-item2"> <apex:outputLink value="/apex/Web_LatestNews_LTG?tags=Decor&thematicPage=1"> Décors <img class="menu-icon" src="{!URLFOR($Resource.picto_decors_white)}"/> </apex:outputLink> </li> </apex:outputPanel>
Is there any other option to display list based on the condition without changing the styles? OR please guide me using with Outputpanel. Thanks.
- Ravindar Admin
- June 12, 2018
- Like
- 0
- Continue reading or reply
%20 is changing to + through outputLink
Hi, I am using Output link as below:
https://test-test.cs86.force.com/Web_LatestNews_LTG?tags=Selective+Line&thematicPage=1
How to prevent changing '%20' to '+' ?
<apex:outputLink value="/apex/Web_LatestNews_LTG?tags=Selective%20Line&thematicPage=1"> </apex:outputLink>When I click on the link, It should redirect as it is. But, '%20' is changing to '+' as below:
https://test-test.cs86.force.com/Web_LatestNews_LTG?tags=Selective+Line&thematicPage=1
How to prevent changing '%20' to '+' ?
- Ravindar Admin
- June 10, 2018
- Like
- 0
- Continue reading or reply
“%20” changing to “+” when passing URL from visualforce page
I am passing URL from Visualforce page as below:
<div class="buttonbox"> <a href="{!communityPrefixe}/Web_LatestNews_LTG?tags=Glass%20School&thematicPage=1">{!$Label.HomePackagingGlass} </a> </div>
The URL should redirects as below:
https://vaqual1-verallia.cs86.force.com/Web_LatestNews_LTG?tags=Selective%20Line&thematicPage=1
But, In the URl "%20" replaced by "+" as below:
https://vaqual1-verallia.cs86.force.com/Web_LatestNews_LTG?tags=Selective**+**Line&thematicPage=1
Can anyone give suggestions on this, Thanks.
<div class="buttonbox"> <a href="{!communityPrefixe}/Web_LatestNews_LTG?tags=Glass%20School&thematicPage=1">{!$Label.HomePackagingGlass} </a> </div>
The URL should redirects as below:
https://vaqual1-verallia.cs86.force.com/Web_LatestNews_LTG?tags=Selective%20Line&thematicPage=1
But, In the URl "%20" replaced by "+" as below:
https://vaqual1-verallia.cs86.force.com/Web_LatestNews_LTG?tags=Selective**+**Line&thematicPage=1
Can anyone give suggestions on this, Thanks.
- Ravindar Admin
- June 07, 2018
- Like
- 0
- Continue reading or reply
How to display the field using javascript?
I have 4 fields: 1)Gender__c 2) Date_of_birth__c 3) Age__c 4) Field4__c
My condition is: If (Gender__c='Female' & Age__c>12) Then display the field4__c.
I tried with the following code, It is displaying When I select the gender='female' & if I enter the value manually which meets the condition: age>12 .
I wrote another Javascript with @RemoteAction to update Age__c when I select the Date_of_birth__c.
It is not displaying the field4__c, If the Age__c is updated from date_of_birth__c.
Code is:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript">
var displayField4 = function() {
var genderVal = $( "[id*='inpFldGender']" ).val();
var ageVal = $( "[id*='inpFldAge']" ).val();
if( genderVal === 'Female' && ageVal > 12 ) {
$( "[id*='inpFld4']" ).show();
$( "[for*='inpFld4']" ).show();
}
else {
$( "[id*='inpFld4']" ).hide();
$( "[for*='inpFld4']" ).hide();
}
};
displayField4();
</script>
My condition is: If (Gender__c='Female' & Age__c>12) Then display the field4__c.
I tried with the following code, It is displaying When I select the gender='female' & if I enter the value manually which meets the condition: age>12 .
I wrote another Javascript with @RemoteAction to update Age__c when I select the Date_of_birth__c.
It is not displaying the field4__c, If the Age__c is updated from date_of_birth__c.
Code is:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript">
var displayField4 = function() {
var genderVal = $( "[id*='inpFldGender']" ).val();
var ageVal = $( "[id*='inpFldAge']" ).val();
if( genderVal === 'Female' && ageVal > 12 ) {
$( "[id*='inpFld4']" ).show();
$( "[for*='inpFld4']" ).show();
}
else {
$( "[id*='inpFld4']" ).hide();
$( "[for*='inpFld4']" ).hide();
}
};
displayField4();
</script>
- Ravindar Admin
- June 10, 2017
- Like
- 0
- Continue reading or reply
How to appear a field based on the two different field values?
I have 3 fields on visualforce page of custom object,
1) gender__c:Male/female(picklist field) 2) age__c: (number field) 3) field3__c:(picklist field)
The field3__c only display, If the gender__c=female & age__c>12.
1) gender__c:Male/female(picklist field) 2) age__c: (number field) 3) field3__c:(picklist field)
The field3__c only display, If the gender__c=female & age__c>12.
- Ravindar Admin
- June 07, 2017
- Like
- 0
- Continue reading or reply
Updating of many records using Formula field meets any governor limits?
I am Trying to create a report on Object__c. So I am trying to use user custom field(projectName__c) value in custom object field(projectName__c) in filter in Reports.
For that, I got a suggestion to do like below, and filter with Boolean.
Create a formula field in the custom object which is checkbox type and formula will be IF(projectName__c=user.projectName__c,true,false)
And create a report where apply filter forumulaField__c = true.
So, This is working fine. But When I change projectName__c, The all same projectName__c record's will be updated. If I change it to another project again records will be updated. I will have 10 Lakhs records in my application, presently I am using developer account.
Does This updating on 10 lakhs records meets any governor limits?
This help will be very Glad.
Thank you.
For that, I got a suggestion to do like below, and filter with Boolean.
Create a formula field in the custom object which is checkbox type and formula will be IF(projectName__c=user.projectName__c,true,false)
And create a report where apply filter forumulaField__c = true.
So, This is working fine. But When I change projectName__c, The all same projectName__c record's will be updated. If I change it to another project again records will be updated. I will have 10 Lakhs records in my application, presently I am using developer account.
Does This updating on 10 lakhs records meets any governor limits?
This help will be very Glad.
Thank you.
- Ravindar Admin
- June 01, 2017
- Like
- 0
- Continue reading or reply
How to save the records as pdf?
In My Visualforce page, I have some picklist fields, Records only display When i select the picklist fields in page . So, How to save that records as pdf or excel?
- Ravindar Admin
- April 24, 2017
- Like
- 0
- Continue reading or reply
error This developer name is invalid. Provide the developer name for the report that contains the chart.
When i try to display chart in Visualforce page the error coming.
- Ravindar Admin
- April 14, 2017
- Like
- 0
- Continue reading or reply
- Ravindar Admin
- January 25, 2017
- Like
- 0
- Continue reading or reply
- Ravindar Admin
- January 10, 2017
- Like
- 0
- Continue reading or reply
- Ravindar Admin
- January 03, 2017
- Like
- 0
- Continue reading or reply
- Ravindar Admin
- December 21, 2016
- Like
- 0
- Continue reading or reply
I have written a class, which is making three consecutive POST requests to different end points, I am facing an issue with code coverage. Below is my class
public class Send_Data_To_NFS2{
public string result;
public HttpResponse res;
public string reqResMethod(string strJSON, string strEndPoint){
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setHeader('Content-Type','application/json');
string strJSONBody = strJSON;
req.setBody(strJSONBody);
req.setMethod('POST');
req.setEndpoint(strEndPoint);
res = h.send(req);
result = res.getBody();
result = result.replace('\\', '').removeStart('"').removeEnd('"');
system.debug('*****res****'+res);
system.debug('*****res.getbody****'+result);
return result;
}
Public void push_Data(){
string strJSON = '-------------------------------------------------------------';
string strEndPoint = '---------------------------------------------------------';
string resp = reqResMethod(strJSON, strEndPoint);
NFSWrapper deserializedResponse = (NFSWrapper)JSON.deserialize(resp, NFSWrapper.class);
secondResponse deserializedResponse1;
if(deserializedResponse != null && deserializedResponse.StatusCode == '200'){
string strJSON1 = '------------------------------------------------------------------------';
string strEndPoint1 = '-------------------------------------------';
string resp1 = reqResMethod(strJSON1, strEndPoint1);
deserializedResponse1 = (secondResponse)JSON.deserialize(resp1, secondResponse.class);
if(deserializedResponse1 != null && deserializedResponse1.StatusCode == '200'){
Attachment att = new Attachment();
att = [select name, body from Attachment where ParentId = '*********************'];
string fileBody = EncodingUtil.base64Encode(att.Body);
system.debug('**************file body**************' + fileBody);
string url = '----------------------------------------------------------------------';
url = url + deserializedResponse1.OpportunityId;
url = url + '&filename=test.pdf';
string resp2 = reqResMethod(filebody, url);
//3rd POST Deserilaization
thirdResponse deserializedResponse2 = (thirdResponse)JSON.deserialize(resp2, thirdResponse.class);
if(deserializedResponse2 != null && deserializedResponse2.StatusCode == '200'){
system.debug('*****ATTACHMENT ADDED SUCCESSFULLY****');
}
else{
system.debug('*****ERROR MESSAGE****' + deserializedResponse2.Message);
}
}else{
system.debug('*****BAD REQUEST2****');
system.debug('*****MESSAGE****'+ deserializedResponse.Message);
}
}else{
system.debug('*****BAD REQUEST1****');
system.debug('*****MESSAGE****'+ deserializedResponse1.Message);
}
}
//Wrapper Classes
public class Nttrapper{
public String StatusCode;
public String OpportunityId;
public String Message;
public string[] ContactIds;
public String BrokerId;
public cls_Addresses[] Addresses;
public String AccountId;
}
public class cls_Addresses {
public String type;
public String Id;
}
public class secondResponse{
public String StatusCode;
public String OpportunityId;
public String Message;
public String BSNumber;
}
public class thirdResponse{
public String StatusCode;
public String Message;
}
}
public string result;
public HttpResponse res;
public string reqResMethod(string strJSON, string strEndPoint){
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setHeader('Content-Type','application/json');
string strJSONBody = strJSON;
req.setBody(strJSONBody);
req.setMethod('POST');
req.setEndpoint(strEndPoint);
res = h.send(req);
result = res.getBody();
result = result.replace('\\', '').removeStart('"').removeEnd('"');
system.debug('*****res****'+res);
system.debug('*****res.getbody****'+result);
return result;
}
Public void push_Data(){
string strJSON = '-------------------------------------------------------------';
string strEndPoint = '---------------------------------------------------------';
string resp = reqResMethod(strJSON, strEndPoint);
NFSWrapper deserializedResponse = (NFSWrapper)JSON.deserialize(resp, NFSWrapper.class);
secondResponse deserializedResponse1;
if(deserializedResponse != null && deserializedResponse.StatusCode == '200'){
string strJSON1 = '------------------------------------------------------------------------';
string strEndPoint1 = '-------------------------------------------';
string resp1 = reqResMethod(strJSON1, strEndPoint1);
deserializedResponse1 = (secondResponse)JSON.deserialize(resp1, secondResponse.class);
if(deserializedResponse1 != null && deserializedResponse1.StatusCode == '200'){
Attachment att = new Attachment();
att = [select name, body from Attachment where ParentId = '*********************'];
string fileBody = EncodingUtil.base64Encode(att.Body);
system.debug('**************file body**************' + fileBody);
string url = '----------------------------------------------------------------------';
url = url + deserializedResponse1.OpportunityId;
url = url + '&filename=test.pdf';
string resp2 = reqResMethod(filebody, url);
//3rd POST Deserilaization
thirdResponse deserializedResponse2 = (thirdResponse)JSON.deserialize(resp2, thirdResponse.class);
if(deserializedResponse2 != null && deserializedResponse2.StatusCode == '200'){
system.debug('*****ATTACHMENT ADDED SUCCESSFULLY****');
}
else{
system.debug('*****ERROR MESSAGE****' + deserializedResponse2.Message);
}
}else{
system.debug('*****BAD REQUEST2****');
system.debug('*****MESSAGE****'+ deserializedResponse.Message);
}
}else{
system.debug('*****BAD REQUEST1****');
system.debug('*****MESSAGE****'+ deserializedResponse1.Message);
}
}
//Wrapper Classes
public class Nttrapper{
public String StatusCode;
public String OpportunityId;
public String Message;
public string[] ContactIds;
public String BrokerId;
public cls_Addresses[] Addresses;
public String AccountId;
}
public class cls_Addresses {
public String type;
public String Id;
}
public class secondResponse{
public String StatusCode;
public String OpportunityId;
public String Message;
public String BSNumber;
}
public class thirdResponse{
public String StatusCode;
public String Message;
}
}
- raj singh 26
- April 18, 2017
- Like
- 3
- Continue reading or reply
- Anitha Reddy 14
- September 23, 2016
- Like
- 2
- Continue reading or reply
Future method Example
Hi All,
Q). What is a future method ? When we are going to use Future methods? Example program for Future method and Schedulable class for Future method?
Give me reply anyone.....
Q). What is a future method ? When we are going to use Future methods? Example program for Future method and Schedulable class for Future method?
Give me reply anyone.....
- Lakshmi S
- August 05, 2016
- Like
- 3
- Continue reading or reply
Batch apex, Queueable apex and @Future method
HI All,
Q). What is a Batch Apex,Queueable Apex and @Future methods?, What are the differences between them and when we are going to use these classes?
Can anyone explain these classes.......
Q). What is a Batch Apex,Queueable Apex and @Future methods?, What are the differences between them and when we are going to use these classes?
Can anyone explain these classes.......
- Lakshmi S
- July 28, 2016
- Like
- 2
- Continue reading or reply
based on picklist value how to display fields
in a picklist field there are two values value1 and value2. by selecting the values in picklist value1 will display fields text1,text2 and value 2 will display text3 and text4.how can achieve this ..
- sukumar pithani
- June 21, 2016
- Like
- 1
- Continue reading or reply
Clicking button it should reload the page, the callout must be perform asynchronous
My question is that clicking button it should reload the page, The callout must be perform asynchronous.
Now its works like a reloading the page after finishing the callout.
Custom Button : Execute JavaScript
Apex class calls external application and update field on record based on response
Thanks
Now its works like a reloading the page after finishing the callout.
Custom Button : Execute JavaScript
{!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")} location.reload(); sforce.apex.execute("MyQuote","callNetsuite",{lstQuoteID:"{!Quote.Id}"});
Apex class calls external application and update field on record based on response
global class MyQuote { @future(callout=true) webservice static void callNetsuite(String lstQuoteID) { List<Quotes> requestQuote = new list<Quotes>(); map<Id,Quote> mapquote = new map<Id,Quote>(); list<Quote> lstQuote = [select Id,Name,Quote.Account.Name,Quote.Account.Netsuite_Customer_Id__c, (select Id,Quantity,UnitPrice,Product2Id,Product2.Name,Product2.Netsuite_Product_Id__c from QuoteLineItems) from Quote where Id=:lstQuoteID]; HttpRequest req = new HttpRequest(); HttpResponse res = new HttpResponse(); Http http = new Http(); String responseBody; String jsonbody = '[{"trandate":"4/1/2015","terms":"","shipaddresslist":"","recordtype":"salesorder","otherrefnum":"test quote SO1","item": [{"quantity":3.00,"item":"128","internalid":"","amount":399.00},{"quantity":3.00,"item":"130","internalid":"","amount":89.99}],"internalid":"","externalid":"0Q028000000L39DCAS","entity":"1249","billaddresslist":""}]' String authorizationHeader = 'NLAuth nlauth_account=XXXXX,nlauth_email=XXXXX,nlauth_signature=XXXXX'; String endpoint = 'https://rest.na1.netsuite.com/app/site/hosting/restlet.nl?script=598&deploy=1'; req.setHeader('Authorization', authorizationHeader); req.setHeader('Content-Type','application/json'); req.setMethod('POST'); req.setTimeOut(120000) ; req.setEndpoint(endpoint); req.setBody(jsonbody); if (!Test.isRunningTest()) { try { //Send endpoint to Netsuite res = http.send(req); responseBody = res.getBody(); System.debug('responseBody:'+responseBody); System.debug('BodyResponse:'+res.toString()); } catch(System.CalloutException e) { System.debug(res.toString()); } }else { // dummy data responseBody = '200'; } if(responseBody != null && responseBody != '') { List<resQuotes> quotelst = (List<resQuotes>)JSON.deserialize(responseBody,List<resQuotes>.class); list<Quote> updateQuotelst = new list<Quote>(); system.debug('quotelst:'+quotelst); for(resQuotes resp : quotelst) { updating the quote record based on response } } } global class resQuotes { webService String recordtype; webService String internalid; webService String externalid; webService List<resItem> item; webService String salesordernumber; webService String issuccess; webService String errorcode; webService String errormessage; } global class resItem { webService String internalid; webService String externalid; webService String status; } }
Thanks
- nagarjuna b
- April 02, 2015
- Like
- 1
- Continue reading or reply
- santhosh kon
- February 20, 2015
- Like
- 1
- Continue reading or reply