Generate Asset when Opportunity Closes (from the products on that Opportunity) #inSalesforce

Generate Asset when Opportunity Closes (from the products on that Opportunity)


Object: Opportunity

on Update

Criteria: Stage equals Closed Won

Actions and Related Records


GET:

getLineItems

OpportunityProducts

Where OpportunityId equals recordId

and etc criteria

Get All records


LOOP through those Products

getLineItems


Assignment:

Set the value to the Asset variable

Create variable: varAsset, Record, Asset

varAsset.Name sampleloopThrough.ProductName

varAsset.AccountId record.AccountId

varAsset.ProducttId loopThrough.Productid

varAsset.Quantity loopThrough.Quantity

varAsset.PurchaseDate record.CloseDate


Assignment:

Collect

Create variable: varAssets, Record, Asset, multiple checked


varAssets Add varAsset


Finally, Create Assets, Multiple, Select varAssets


Done


Connect, Save, Debug, Activate, Test











                                   Visual: https://www.youtube.com/watch?v=Hjq5edxN-WY


Comments