• Topher Sympson
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 5
    Replies
On an event I'm attempting to pre-fill a Master-Detail(Account) field on a new custom object record using the e.force:createRecord method.. Is this possible?

I've tried putting in the ID of the account record, the text.. that's it so far..
navigateToCreateRecord: function(beNum, stateInput) {
        let siteIdentifier = `${stateInput}${beNum} - `; 
		var navEvt = $A.get("e.force:createRecord");
        navEvt.setParams({
            "entityApiName": "Site__c",
			"defaultFieldValues": {
				'Name' : siteIdentifier,
				'BE__c' : beNum,
				'Shipping_State__c' : stateInput,

				// Below is field attemping to fill:
				'VNT__c' : 'VNT'				
			}
        });
        navEvt.fire();
    },
Thank you!
I have a requirement where I need a component to override the 'New' record button and initially ask for two fields, the fields will be verified for any dups and then save those fields to a new record and then open up the new record's edit page. (Edit modal, same as clicking the Edit button on the record page.

At the moment I'm using e.force:editRecord but it just loads the new record page and not the edit page..


 
navigateToEditRecord: function(component, recId) {
        var navEvt = $A.get("e.force:editRecord");
        navEvt.setParams({
            "recordId": recId
        });
        navEvt.fire();
    },
verifyAndInitialSave: function (component, event) {
		component.set("v.siteRecord.BE__c", component.find('beEdit').get("v.value"));    
		component.set("v.siteRecord.Shipping_State__c", 
                component.find('stateEdit').get("v.value"));
		
		var tempRec = component.find("forceRecord");
		var self = this;
		tempRec.saveRecord($A.getCallback(function(result) {
			console.log(result.state);
			var resultsToast = $A.get("e.force:showToast");
			if (result.state === "SUCCESS") {
				// Call navigateTo Function here:
				var recId = result.recordId;
				self.navigateToEditRecord(component, recId);
				                
			} else if (result.state === "ERROR") {
				console.log('Error: ' + JSON.stringify(result.error));
				resultsToast.setParams({
					"title": "Error",
					"message": "There was an error saving the record: " + JSON.stringify(result.error)
				});
				resultsToast.fire();
			} else {
				console.log('Unknown problem, state: ' + result.state + ', error: ' + JSON.stringify(result.error));
			}
		}));

	}
Thank you for any help!
We are looking to have leads select products of interest but if they select multiple (not common) we need to duplicate that lead and assign to each rep that covers the selected products in their territory. So we have Leads that select Products assigned to Zip codes assigned to Reps
I have a requirement where I need a component to override the 'New' record button and initially ask for two fields, the fields will be verified for any dups and then save those fields to a new record and then open up the new record's edit page. (Edit modal, same as clicking the Edit button on the record page.

At the moment I'm using e.force:editRecord but it just loads the new record page and not the edit page..


 
navigateToEditRecord: function(component, recId) {
        var navEvt = $A.get("e.force:editRecord");
        navEvt.setParams({
            "recordId": recId
        });
        navEvt.fire();
    },
verifyAndInitialSave: function (component, event) {
		component.set("v.siteRecord.BE__c", component.find('beEdit').get("v.value"));    
		component.set("v.siteRecord.Shipping_State__c", 
                component.find('stateEdit').get("v.value"));
		
		var tempRec = component.find("forceRecord");
		var self = this;
		tempRec.saveRecord($A.getCallback(function(result) {
			console.log(result.state);
			var resultsToast = $A.get("e.force:showToast");
			if (result.state === "SUCCESS") {
				// Call navigateTo Function here:
				var recId = result.recordId;
				self.navigateToEditRecord(component, recId);
				                
			} else if (result.state === "ERROR") {
				console.log('Error: ' + JSON.stringify(result.error));
				resultsToast.setParams({
					"title": "Error",
					"message": "There was an error saving the record: " + JSON.stringify(result.error)
				});
				resultsToast.fire();
			} else {
				console.log('Unknown problem, state: ' + result.state + ', error: ' + JSON.stringify(result.error));
			}
		}));

	}
Thank you for any help!
User cannot upload consent file with large size.
The org file size limit is 6000 000 bytes(6MB).
When user try to upload file with size 3 - 5.7 MB (in allowed limit), the error is displayed  --> Received exception event aura:systemError from server
IF file within 2MB is uploaded, there is no error. This seems to be happening since Spring 19 release.
Any ideas why?
We are looking to have leads select products of interest but if they select multiple (not common) we need to duplicate that lead and assign to each rep that covers the selected products in their territory. So we have Leads that select Products assigned to Zip codes assigned to Reps

Hi there,

 

<back history>  To calculate support eligibility, we have a custom formula field that needs to get populated with the latter of 2 dates (Date of Purchase vs. Date Registered) + 90 days. 

 

We're having a problem with the following formula:

 

X90_Day_Date__c = IF(firstUseTimestamp__c > DateOfPurchase__c, firstUseTimestamp__c, DateOfPurchase__c) + 90

 

The formula works GREAT and the X90_Day_Date field is populated correctly if there are date values in both fields.  Also, the formula works if the Date of Purchase field has a value and the other is blank, but won't populate if the firstUseTimestamp_c field is blank.

 

I've toggled blank field handling between zero and null, to no luck. 

 

I think I'm on the right track, but might need to wrap this in another IF statement (if value is blank/null)...?

 

Any help would be greatly appreciated... Thanks!

I use a custom tab to show a URL in an iframe. The URL points to my app, which includes pages of varying heights.

When the custom tab is defined, I'm forced to enter a specific height. But that height isn't the best height for each page of my app.

What I'd like to do is have the iframe height automatically set itself based on the height of my page. Unfortunately when I try to access the iframe object to modify it with JavaScript, I get a permission denied error.

Viewing the source of the salesforce.com page that contains my iframe, I see a doResize() method that appears it would set the height of the iframe to fit my content. Unfortunately I can't call that method from my page; it also gives me a permission denied error.

If I specify a height of 600 (for example) when I define my custom tab, the iframe has scrollbars. I could possibly be ok with that, except that if the browser window isn't tall enough, the main window also has scrollbars. So I've got double scrollbars which is very unpleasant to use. You have to scroll the main window down in order to be able to scroll the iframe all the way down.

My solution for now has been to specify an iframe height that's taller than I expect my pages to be (5000) to make sure the iframe won't have scrollbars, only the main window. The problem with that is that the user isn't taken to the top when a new page is clicked on. So if a user is at the bottom of a long page and clicks a link to go to a short page, the window doesn't automatically scroll to the top, so the user doesn't see anything on the short page, just empty space.

If I could control the main window scrollbar, I could fix that problem. But I don't have permission for that either.

At this point I'm out of ideas for what to do, so any suggestions are greatly appreciated.

For a future release, could salesforce make specifying the iframe height optional? And if you didn't specify a pixel height, the doResize() method would be called to automatically set the height?

Thanks for any advice,

=> Darla
User cannot upload consent file with large size.
The org file size limit is 6000 000 bytes(6MB).
When user try to upload file with size 3 - 5.7 MB (in allowed limit), the error is displayed  --> Received exception event aura:systemError from server
IF file within 2MB is uploaded, there is no error. This seems to be happening since Spring 19 release.
Any ideas why?