on ‎2016 Jun 30 8:44 AM
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manfred,
For normal PSM released standard fields, you can assign default value in AfterModify event of respective nodes.
e.g
In Customer-> Root-> AfterModify, you can assign InternalID to an default value.
this.InternalID = "CUS1";
But Sales Data is SalesArrangement BO in ByD. It is [0,n] association from Customer BO.
SalesArrangement association cannot be created from Customer BO. Instead, SalesArrangement can be created separately. CustomerUUID + SalesOrganisationUUID is unique in SalesArrangement.
Here is how to create an instance of SalesArrangement.
import AP.FO.MOM.Global;
var sa: elementsof SalesArrangement;
var fu= FunctionalUnit.Retrieve("123"); // 123 is just an example
if(fu.IsSet()){
sa.CustomerUUID=this.UUID;
sa.DistributionChannelCode.content="01";
sa.SalesOrganisationUUID = fu.UUID;
var testInstance = SalesArrangement.Create(sa);
testInstance.PricingTerms.CurrencyCode ="EUR";
}
Currency Code is not just a simple field.
Best Regards,
Fred
Hello Fred,
thank you for your post, it really helped me to understand how it could work, but I have one more question regarding your code snippet.
You wrote:
"var fu= FunctionalUnit.Retrieve("123"); // 123 is just an example"
As I understand it, the "123" is the UUID/ID of the functional unit. (Please correct me if I am wrong?)
But how is it possible to get this UUID/ID of the functional unit from my customer?
I tried to get from my customer to the right functional unit, but without any success. Maybe you have an idea...
BR Manfred
Hi Fred,
->As I understand it, the "123" is the UUID/ID of the functional unit
Yes, correct.
->But how is it possible to get this UUID/ID of the functional unit from my customer?
No, you cannot. You will need to assign a default sales unit just as I did.
Sales Organization assignment is mandatory for every customer, basically.
You will have to somehow need to determine a sales organization for the customer.
When you click View All and go to check more details of a customer, under Sales tap, you can see Currency and Payment Terms are just properties assigned to a sales organization. Without a sales organization, they cannot exist.
Best Regards,
Fred
Hi Manfred,
you can create a new event handler and perform a script.
There you have an if statement where you check if the field is empty.
If the field is empty, set the value.
Bind the event handler on the event handler that loads the bo.
Best regards,
Astrid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.