• Natraj Subramani 15
  • NEWBIE
  • 20 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 13
    Replies
Hi All,

I am getting the below error when I am trying to run a build in Azure Devops for a Salesforce deployment. 

Does any one know how to specify ANT_OPTS in Azure Devops to avoid this error ?

Any other tips or workaround is also appreciated.


BUILD FAILED
/home/vsts/work/1/s/build/build.xml:32: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:3236)
    at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
    at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
    at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:78)
    at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
    at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:211)
    at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:145)
    at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
    at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
    at java.io.Writer.write(Writer.java:157)
    at com.sforce.ws.parser.MXSerializer.writeElementContent(MXSerializer.java:1005)
    at com.sforce.ws.parser.MXSerializer.text(MXSerializer.java:802)
    at com.sforce.ws.parser.XmlOutputStream.writeText(XmlOutputStream.java:103)
    at com.sforce.ws.bind.TypeMapper.writeSimpleType(TypeMapper.java:306)
    at com.sforce.ws.bind.TypeMapper.writeSingleObject(TypeMapper.java:397)
    at com.sforce.ws.bind.TypeMapper.writeObject(TypeMapper.java:369)
    at com.sforce.soap.metadata.Deploy_element.writeFieldZipFile(Deploy_element.java:51)
    at com.sforce.soap.metadata.Deploy_element.writeFields1(Deploy_element.java:129)
    at com.sforce.soap.metadata.Deploy_element.writeFields(Deploy_element.java:97)
    at com.sforce.soap.metadata.Deploy_element.write(Deploy_element.java:90)
    at com.sforce.ws.transport.SoapConnection.writeBody(SoapConnection.java:366)
    at com.sforce.ws.transport.SoapConnection.sendRequest(SoapConnection.java:337)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:96)
    at com.sforce.soap.metadata.MetadataConnection.deploy(MetadataConnection.java:351)
    at com.salesforce.ant.DeployTask.submitMessage(DeployTask.java:326)
    at com.salesforce.ant.SFDCMDAPIAntTaskRunner.runTask(SFDCMDAPIAntTaskRunner.java:29)
    at com.salesforce.ant.DeployTask.execute(DeployTask.java:63)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
Total time: 28 seconds
The process '/usr/bin/ant' failed with exit code 1
##[error]Error: The process '/usr/bin/ant' failed with exit code 1

Thanks
Natraj
Hi All,

We have a Rich text field on a custom object where we would like to upload images via dataloader or tools like talend. For some reasons we are not able to do it via backend but can upload images using the UI (Lightning experience).

Has anyone implemented it ? Please do share some inputs if you have accomplished it.

Thanks
Natraj
Hi All,

I initially got the CI/CD part working between Azure Devops and Salesforce sandbox. Whenever I push the code to DevOps branch, the build would automatically happen and trigger ANT which would use the variables like login url, password, username etc and deploy the latest code to specified Salesforce sandbox.


I was forced to change my Salesforce sandbox password and from then onwards the build is failing with below error. Though I can login into the Salesforce using the same username and password, ANT is still not recognizing my new password and throws the below invalid password error.


BUILD FAILED /home/vsts/work/1/s/build/build.xml:29: Invalid username, password, security token; or user locked out##[error]Error: The process '/usr/bin/ant' failed with exit code 1

##debug]Processed: ##vso[task.issue type=error;]Error: The process '/usr/bin/ant' failed with exit code 1 ##debug]Processed: ##vso[task.complete result=Failed;]Error: The process '/usr/bin/ant' failed with exit code 1 

User-added image

In the above screen shot, I see the correct username, login url and password displayed but still the invalid password error comes up.

When I check login history, this is what I see. Any help is appreciated.

User-added image

Any help is appreciated

Thanks
Natraj
 
Hi All,

Does any one have an idea on how to move code from Azure DevOps branch to Salesforce Sandbox using CI/CD ?

If so please share some details.,

Thanks
Natraj
Hi All,

We have a parent child relationship on the Case object. Basically a self look up relationship. 

We would like to know the number of child cases a parent case has and store in a field called "No of child Cases"

Any suggestions to get this requirement accomplished ?

Thanks
Natraj
Hi All,

I have view/new Visualforce pages built on standard object Case. I have another custom field called "Parent Case" which is a look up to Case object.

I have added look up filters Parent Case field to display only certain record type and status = closed.

For some reasons the look up filter is not working at all. Not sure if I am missing something.

Please advise how to get look up filters working on VF pages.

Thanks
Natraj
Hi All,

We have a custom search configured on case object which uses the searchresults class to look for the value entered by user in certain fields.

Search.searchResults searchResults = search.find('FIND "string in ALL FIELDS RETURNING case(id,number......where record type Id=:recid)');

When I enter last 5 characters of the case  number, results dont come up but when I enter 6 charcters it comes up. Is there any pattern how this search works ? Can any one explain ?

Thanks
Natraj
Hi All,

We have created a standard salesforce report based on a custom object. The report is placed in a report folder which has "Viewer" access for certain users.

The report is accessed via button click, which passes few filters to the report (Like District etc).Users will only see data related to their district.

The report works perfectly fine but it gives users the access to edit the report filter. User can still change the filter and run the report to see other data.

Is there a way to make a report & its filters read only?

I did try removing "Create and Customize Reports" and user can no longer edit the filters for that report but thats taking away the create access for personal folders.

Any suggestions, please confirm.

Thanks
Natraj
Hi All,

I have created a new custom button to send email. I was able to modify the custom button url to defaul 
To Address
Subject

I was also able to default the from address using p26 option. The issue is I would like to default the value to one of the org wide email addresses set.

How do we set from address in the custom button URL to include org wide email address. I tried the below options.

&p26="xxxx@xxx.com" - This works fine but the from drop down shows the same value twice (one from ord wide and one from URL)

&p26={!$ObjectType.OrgWideEmailAddress} - When I specify id or name it says invalid
&p26="org wide id" - This only displays the id in the from field.

Any suggesitons, please let us know.

Thanks
Natraj

Hi All,

Created a new custom button called "Send Email" and set the behaviour as "Display in existing window without sidebar or header" and content source as "URL"

URL : /_ui/core/email/author/EmailAuthor?p2_lkid={!Case.ContactId}&rtype=003&p3_lkid={!Case.Id}&retURL=%2F{!Case.Id}

When I click on the above button in lightning experience, it opens up the send email box correctly. This looks slightly like the classic version. Is there a way we can correct the URL to display as lightning experience ?

Thanks
Natraj

Hi All,

I am able to retrieve the lines of code for Classes/Pages and Triggers using the below code. Is there a way to extract lines of code for lighting components ? Any help is appreciated.

Integer classLines = 0;

Integer triggerLines = 0;

Integer pageLines = 0;

for(ApexClass a : [Select Body From ApexClass]){

                    List<String> lines = a.Body.split('\n');

                    classLines += lines.size();

}

for(ApexTrigger a : [Select Body From ApexTrigger]){

                    List<String> lines = a.Body.split('\n');

                    triggerLines += lines.size();

}

for(ApexPage a : [Select Markup From ApexPage]){

                    List<String> lines = a.Markup.split('\n');

                    pageLines += lines.size();

}


system.debug('Apex Class lines: ' + classLines);

system.debug('Apex Trigger lines: ' + triggerLines);

system.debug('VisualForce lines: ' + pageLines);

system.debug('Apex Total lines: ' + (classLines+ triggerLines+pageLines));

Thanks
Natraj

Hi All,

We have a custom button (part of case detail page) with visualforce override (VF page has been rendered as PDF). This button works perfectly fine in classic. I can see the pdf generated.

In Salesforce lightning, this is throwing an error. "An internal server error has occurred. An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience."

When I inspect the page and see I see this error "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided " . Debug logs also not showing any errors.

Any idea why this button is not working in lightning ?

Thanks
Natraj

Hi Team,

I need a textarea box displayed in my visualforce page (which is rendered as PDF). I used the below code, for some reasons I dont see the box at all. Am I misisng something ?

<apex:page rendered="true" renderAs="pdf" sidebar="false" lightningStylesheets="true" applyHtmlTag="true" doctype="html-5.0">
<html>
 <textarea richtext="true" cols="50" rows="5" required="true"></textarea>
</html>
</apex:page>

Also please confirm how we can have borders around fields.  I basically need to have borders for my section of fields.

Thanks
Natraj
Hi All,

I have the below code in lightning component. I am trying to get some field values to validate in controller and I am getting null when I try to alert it. The record id alone is working.

     <aura:attribute name="recordId" type="id" />
     <aura:attribute name="record" type="Object" />
     <aura:attribute name="CaseRecord" type="Object" />
<force:recordData aura:id="record" fields="Id,Name,Responsibility_Lookup__c,Index_Lookup__c" layoutType="FULL" recordId="{!v.recordId}" targetError="{!v.recordError}" targetRecord="{!v.record}" targetFields="{!v.CaseRecord}"  mode="VIEW"/>

Controller

var getid = component.get('v.recordId');     
var rcname = component.get('v.Responsibility_Lookup__c'); 
alert("SR ID==="+getid);
alert("Resp Name==="+rcname);

I also tried var rcname = component.get('v.CaseRecord.Responsibility_Center_Lookup__c');

Still it comes as null or undefined, any suggestions on how to retrieve case field values in lightning controller ?

Thanks
Natraj
Hi All 

Created a new community using Napili template. I used the community builder and got the home page and other sections set up. (using navigation menu).I am however hitting with some limitations.

My home page should have a form with few fields and a submit button (to create a record in custom object). How do I achieve it ? With current options, I can only place a "Create Record" button on home page & that opens another page.Is there a way get all in one screen ?

Also I would like to assign a new record type for all records created in the community 

Once user submits the record, I need to have a thank you page with a link back to home page. Is this possible?

Since I am fairly new to communities I am not quite getting the abilities of  Community Builder. Does any one have some links of examples and study guide for Napili template. Please do suggest

Thanks
Natraj
Hi All,

I initially got the CI/CD part working between Azure Devops and Salesforce sandbox. Whenever I push the code to DevOps branch, the build would automatically happen and trigger ANT which would use the variables like login url, password, username etc and deploy the latest code to specified Salesforce sandbox.


I was forced to change my Salesforce sandbox password and from then onwards the build is failing with below error. Though I can login into the Salesforce using the same username and password, ANT is still not recognizing my new password and throws the below invalid password error.


BUILD FAILED /home/vsts/work/1/s/build/build.xml:29: Invalid username, password, security token; or user locked out##[error]Error: The process '/usr/bin/ant' failed with exit code 1

##debug]Processed: ##vso[task.issue type=error;]Error: The process '/usr/bin/ant' failed with exit code 1 ##debug]Processed: ##vso[task.complete result=Failed;]Error: The process '/usr/bin/ant' failed with exit code 1 

User-added image

In the above screen shot, I see the correct username, login url and password displayed but still the invalid password error comes up.

When I check login history, this is what I see. Any help is appreciated.

User-added image

Any help is appreciated

Thanks
Natraj
 
Hi All,

We have a parent child relationship on the Case object. Basically a self look up relationship. 

We would like to know the number of child cases a parent case has and store in a field called "No of child Cases"

Any suggestions to get this requirement accomplished ?

Thanks
Natraj
Hi All,

I have view/new Visualforce pages built on standard object Case. I have another custom field called "Parent Case" which is a look up to Case object.

I have added look up filters Parent Case field to display only certain record type and status = closed.

For some reasons the look up filter is not working at all. Not sure if I am missing something.

Please advise how to get look up filters working on VF pages.

Thanks
Natraj
I added a button to my Opportunities that sends an email with a template and autofilled fields using javascript. However, this button does not appear in lightning since it doesn't support JS. Is there another alternative to replace this button, so I can have a visible button on both classic and lightning? 
Hi All,

I am able to retrieve the lines of code for Classes/Pages and Triggers using the below code. Is there a way to extract lines of code for lighting components ? Any help is appreciated.

Integer classLines = 0;

Integer triggerLines = 0;

Integer pageLines = 0;

for(ApexClass a : [Select Body From ApexClass]){

                    List<String> lines = a.Body.split('\n');

                    classLines += lines.size();

}

for(ApexTrigger a : [Select Body From ApexTrigger]){

                    List<String> lines = a.Body.split('\n');

                    triggerLines += lines.size();

}

for(ApexPage a : [Select Markup From ApexPage]){

                    List<String> lines = a.Markup.split('\n');

                    pageLines += lines.size();

}


system.debug('Apex Class lines: ' + classLines);

system.debug('Apex Trigger lines: ' + triggerLines);

system.debug('VisualForce lines: ' + pageLines);

system.debug('Apex Total lines: ' + (classLines+ triggerLines+pageLines));

Thanks
Natraj

Hi All,

We have a custom button (part of case detail page) with visualforce override (VF page has been rendered as PDF). This button works perfectly fine in classic. I can see the pdf generated.

In Salesforce lightning, this is throwing an error. "An internal server error has occurred. An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience."

When I inspect the page and see I see this error "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided " . Debug logs also not showing any errors.

Any idea why this button is not working in lightning ?

Thanks
Natraj

Hi Team,

I need a textarea box displayed in my visualforce page (which is rendered as PDF). I used the below code, for some reasons I dont see the box at all. Am I misisng something ?

<apex:page rendered="true" renderAs="pdf" sidebar="false" lightningStylesheets="true" applyHtmlTag="true" doctype="html-5.0">
<html>
 <textarea richtext="true" cols="50" rows="5" required="true"></textarea>
</html>
</apex:page>

Also please confirm how we can have borders around fields.  I basically need to have borders for my section of fields.

Thanks
Natraj

Hi,

I have created a visualforce page where i've used standard controller as one of the custom object from my organisation.

On custom object , I've look up which has certain criteria defined. But when i use this Lookup as inputfield on Visualforce page, the look up window doesnt showing any records on it. The same look up filter works in Salesforce Native UI.

Can any one let me know why this is happening. Appreciatethe help.

Thanks in advance.
Dipak